user
10/04/2021, 4:24 PMuser
10/04/2021, 5:58 PMuser
10/04/2021, 5:58 PMuser
10/04/2021, 8:54 PMuser
10/04/2021, 10:02 PMambitious-actor-36781
10/04/2021, 11:37 PMpants peek
into something like --spec-files
can you?user
10/05/2021, 3:45 PMuser
10/05/2021, 5:18 PMbusy-vase-39202
10/05/2021, 5:46 PMbrave-furniture-86963
10/05/2021, 10:28 PMuser
10/06/2021, 2:56 PMclean-city-64472
10/06/2021, 3:30 PMclean-city-64472
10/06/2021, 5:25 PMclean-city-64472
10/06/2021, 5:49 PMfrom .subfolder import something
vs from module.subfolder import something
?)narrow-vegetable-37489
10/06/2021, 7:01 PM[mypy].extra_requirements
to requriements.txt
(as recommended in https://github.com/pantsbuild/pants/pull/12597), our PEXs have increased in size by roughly 20MB each. This by itself doesn't sound like much but, seeing how they were "only" ~70MB before, it ends up being a significant percentage. Why it happens is quite understandable, but preferably type stubs would be skipped in PEXs since (to me) they don't seem to add much value there. Not sure if this is an oversight or simply a con to the pros of 12597 🙂gorgeous-eve-12553
10/06/2021, 8:14 PMmodern-leather-27612
10/06/2021, 8:41 PM./pants --changed-since=origin/boss --changed-dependees=transitive test
However, there is one area that has left me completely befuddled and I would much appreciate pointers to documentation I might have missed or an explanation. That area is PEX. When I run Python in a virtual environment, I can easily test for its presence (sys.prefix != sys.base_prefix
) and I can easily configure the environment for a subprocess (prepend `bin`/`Scripts` to PATH
, set VIRTUAL_ENV
to root of venv). If I run pip list
in that subprocess it will be the pip
installed in the venv and it will correctly report what other packages are installed as well. Amazingly, I don't even have to include PYTHONPATH
in the environment.
Clearly, PEX does things differently. As much is obvious from my instrumentation. Notably, the proof-of-concept really is a trivial tool to collect relevant information from sys
, sysconfig
, and os.environ
. It also extracts installed packages by spawning pip
, using importlib.metadata.distributions()
, and an evil hack that looks at the names and versions of the wheel files in sys.path
. As you can see, I did try to do my homework. But try as I may, I'm getting very strange behavior when using pip
. First, it runs a completely different, older pip than the one inside the PEX. Second, that pip reports no packages installed besides itself. Third, it maintains that this is the case even when I prime it with the different paths on sys.path
. I am forwarding sys.path
through PYTHONPATH
and leaving the environment otherwise untouched. Uhm, do you have an idea what's going on? And how do I spawn subprocesses correctly from within a PEX? Thanks!ambitious-actor-36781
10/07/2021, 6:43 AM$ pants --changed-since="origin/master" list
3rdparty:requirements.txt
build-support/deploy/base.py:lib
build-support/deploy/deploy.py:lib
$ pants --changed-since="origin/master" --changed-dependees=transitive list
3rdparty:Cerberus
3rdparty:SQLAlchemy
3rdparty:alembic
... <everything> ...
Pants 2.7.0
Yes, requirements.txt has changed. But the actual changes in those requirements have not affected everythingcurved-television-6568
10/07/2021, 6:44 AMpackage
in case of changed dependencies/set of sources and the like.)curved-television-6568
10/07/2021, 7:12 AMnarrow-activity-17405
10/07/2021, 10:42 AMadorable-engine-71736
10/07/2021, 6:02 PM[mypy].extra_requirements
.
I updated to 2.7.0 and added a lockfile (which contains my stub deps)
The mypy PEX has the stub deps, afaict
When i run typecheck
now it says that the stubs are not installed. I would really rather not add the stubs as runtime deps as they are not, so wondering if/how to get the old behaviour working againeager-dress-66405
10/07/2021, 6:45 PMBUILD.pants
for all of our build files. Renaming existing ones was easy, but I noticed ./pants tailor
was still creating BUILD
files even with build_patterns = ["BUILD.pants"]
(i think this option doesn't actually change anything, but was trying to be explicit). I went looking at the code and found the ability to change this was recently added in https://github.com/pantsbuild/pants/pull/12979. I'm currently running 2.7.0
, am I correct that this option won't be usable until 2.8.0
? I tried 2.8.0.dev0
and it still isn't available. And I assume I don't want to be using the beta..hundreds-father-404
10/07/2021, 7:33 PMuser
10/07/2021, 8:27 PMuser
10/07/2021, 8:31 PMhttps://pbs.twimg.com/media/FBCiISzUUAMaX-P.jpg▾
user
10/07/2021, 9:06 PMripe-kitchen-64238
10/07/2021, 10:02 PMuser
10/08/2021, 2:19 PMuser
10/08/2021, 3:59 PM