high-yak-85899
03/30/2022, 1:57 AMpytest.ini
unignored in my pants_ignore
in pants.toml
. I'm confused how it could ever work though now š¤high-yak-85899
03/30/2022, 1:57 AMhappy-kitchen-89482
03/30/2022, 2:14 AMrapid-exabyte-76685
03/30/2022, 5:09 AMtest
runs with (ideally to 1, since I have problems with tests running in parallel that I will solve in the medium-term, but not in the short-term)echoing-farmer-15630
03/30/2022, 1:15 PMpython_requirements
in a top-level BUILD
file which sourced a constraints.txt
for the entire package, which had entries like
module_mapping={..."setuptools: ["pkg_resources"]...},
overrides={"torch": {"dependencies": [":setuptools"]}
so far so good (I know the pkg_resources should probably have been sorted automatically but we were having difficulties there).
This used to work... but when I turn on use_deprecated_python_macros=false
, it tells me I need to name that stanza of requirements. But if I give it a name (name="root_requirements"
or some such) when I try to do anything like generate lockfiles I get
ResolveError: 'setuptools' was not found in namespace ''. Did you mean one of:
Okay, but if I try to name it (say, replace every instance of setuptools
there with //root_requirements:setuptools
) then I get
ResolveError: The file or directory 'root_requirements' does not exist on disk in the workspace, so the address 'root_requirements:setuptools' cannot be resolved.
... presumably because the requirements haven't been created yet or..?
Just baffled; this worked fine earlier but presumably it was wrong then too. What's the right way to do this?fast-nail-55400
03/30/2022, 1:35 PM//:root_requirements#setuptools
fast-nail-55400
03/30/2022, 1:37 PM//
starts at root. :root_requirements
with colon selects that āgenerator targetā. #setuptools
selects one of its āgenerated targetsāechoing-farmer-15630
03/30/2022, 1:37 PMfast-nail-55400
03/30/2022, 1:38 PMbitter-ability-32190
03/30/2022, 1:39 PMtorch -. setuptools
issue, which is really just a prolific problem in Python packages, where they assume setuptools
exists in every Python environment and so don't declare the depfast-nail-55400
03/30/2022, 1:40 PMfast-nail-55400
03/30/2022, 1:41 PMechoing-farmer-15630
03/30/2022, 1:46 PMoverrides
. The one that threw me was that something in the past referred to pkg_resources
but didn't pull in setuptools
... but that was quite a while ago (these are legacy BUILD files by now!)
I'll try removing that line and seeing if it's still necessary.echoing-farmer-15630
03/30/2022, 1:54 PMbitter-ability-32190
03/30/2022, 1:58 PMechoing-farmer-15630
03/30/2022, 2:15 PMpython_requirements
for our direct dependencies) but I wasn't sure of that yet)bitter-ability-32190
03/30/2022, 2:17 PMbitter-ability-32190
03/30/2022, 2:17 PMechoing-farmer-15630
03/30/2022, 2:32 PMechoing-farmer-15630
03/30/2022, 2:32 PMbitter-ability-32190
03/30/2022, 2:35 PMlockfile_generator
to pex
and when you run generate-lockfile
you'll get a PEX JSON. the PEX JSON contains transitive package metadata, so when Pants asks PEX to make pexs, it can do so fully in parallel, instead of semi-serially.bitter-ability-32190
03/30/2022, 2:35 PMbitter-ability-32190
03/30/2022, 2:35 PMbitter-ability-32190
03/30/2022, 2:36 PMechoing-farmer-15630
03/30/2022, 2:58 PMechoing-farmer-15630
03/30/2022, 4:20 PMechoing-farmer-15630
03/30/2022, 4:29 PMwide-zoo-86070
03/30/2022, 5:44 PMhappy-kitchen-89482
03/30/2022, 5:57 PMhundreds-father-404
03/30/2022, 6:05 PM