Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip compile with local disk package without hard dependency on uv? #3593

Closed
Nomelas opened this issue May 14, 2024 · 2 comments
Closed

pip compile with local disk package without hard dependency on uv? #3593

Nomelas opened this issue May 14, 2024 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@Nomelas
Copy link

Nomelas commented May 14, 2024

This is my situation,

In my project i have a pyproject.toml which contains my dependencies and maps my lib directory as a local package.
When i run pip install . it installs my dependencies and my lib directory as my project name (my-project for example) and version specified in my pyproject.toml (version is actually dynamic).

In order to have uv pip compile also include my local package, i needed to create a requirements.in which contains only . (i have a separate one for requirements-dev.in containing -e .[dev] for additional development dependencies).

When I run uv pip compile requirements.in -o requirements.txt, it generates the file as expected except for the line;
my-project @ .

When I run uv pip compile requirements-dev.in -o requirements-dev.txt, it generates the file as expected except for the line;
-e .

Now, when I run vanilla pip install -r requirements-dev.txt it works as expected, but when I run pip install -r requirements.txt, it complains that the line my-project @ . is not valid. This works fine however when running uv pip install -r requirements.txt but my goal is to not have a hard dependency on uv when installing already pinned versions like this. Is it possible to accomplish this?

@Nomelas Nomelas changed the title pip compile with local disk package? pip compile with local disk package without hard dependency on uv? May 14, 2024
@Nomelas
Copy link
Author

Nomelas commented May 14, 2024

manually replacing "my-project @ ." with "." makes it work with pip, but there must be a better way?

@charliermarsh
Copy link
Member

Yes, pip does not support relative paths with named dependencies, and we always output with names. You can track and chime in here if you'd like: #3180

@charliermarsh charliermarsh closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
@zanieb zanieb added the duplicate This issue or pull request already exists label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants