purple-hydrogen-4740
04/09/2024, 12:38 PM[python-repos].find_links
like so
[python-repos]
# No one needs to change these values, as long as they can use the same shared location.
find_links = ["file://%(buildroot)s/prebuilt_wheels"]
path_mappings = ["WHEELS_DIR|%(buildroot)s/prebuilt_wheels"]
but couldn't get it working without actually rewriting the dependency's full path in the generated python lock file.
BUILD file with full local path like below works fine.
python_requirement(
name="django",
# Use an absolute path to a .whl or sdist file.
requirements=["Django @ file:///Users/pantsbuild/prebuilt_wheels/django-3.1.1-py3-none-any.whl"],
)
But BUILD file with
python_requirement(name="django", requirements=["django>=3.1,<3.2"])
was still using the pypi repository instead of the local wheels directory specified with env var in python-repos.
Hack that I used to make it work was to generate the lockfile using the full path file:///Users/pantsbuild/prebuilt_wheels/django-3.1.1-py3-none-any.whl
and then rewrite it in the locfile using the env var WHEELS_DIR
What am I missing?