Feeling a touch foolish; we had some `python_requi...
# general
e
Feeling a touch foolish; we had some
python_requirements
in a top-level
BUILD
file which sourced a
constraints.txt
for the entire package, which had entries like
Copy code
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
Copy code
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
Copy code
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?