8000 `-r other_file.txt` in `-r requirements.txt` path resolve differs from pip · Issue #2763 · pex-tool/pex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
-r other_file.txt in -r requirements.txt path resolve differs from pip #2763
Closed
@tgolsson

Description

@tgolsson

Reproed this from a question asked on the Pants slack, and it seems like it's a Pex issue and can be reproed standalone.

The original question:

It seems that uv pip interpreters includes (-r extra.txt ) relative to the current requirement file, whereas pants seems to take it relative to project root. Is there a way to get pants to include the file relative to the including file? Or at least relative to the BUILD file that has the python_requirements target?

And this script reproduces a success with both uv and pip but fails with pex:

python3 -m venv .venv
source .venv/bin/activate

mkdir -p requirements
echo "numpy" > requirements/requirements.txt
echo "-r extras.txt" >> requirements/requirements.txt
echo "pandas" > requirements/extras.txt

pip install --dry-run -r requirements/requirements.txt
uv pip install --dry-run -r requirements/requirements.txt
pex3 lock create -r requirements/requirements.txt

This is using pex 2.38.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0