We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When trying to use layered requirements in pyproject.toml, pip-compile fails.
pip-compile
Using the following pyproject.toml file
pyproject.toml
[build-system] requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" [project] name = "not-in-pypi" version = "0.1.0" dependencies = [ "click", "numpy", "scikit-learn", ] [project.optional-dependencies] test = ["pytest"] dev = ["not-in-pypi[test]", "ipython"]
and running pip-compile -o dev-requirements.txt --extra dev pyproject.toml (same command as in the docs), pip-compile fails with
pip-compile -o dev-requirements.txt --extra dev pyproject.toml
Could not find a version that matches not-in-pypi[test] (from not-in-pypi (pyproject.toml)) No versions found Was https://pypi.org/simple reachable?
However trying to install the package with pip install .[dev] works perfectly fine.
pip install .[dev]
I think this usage of optional dependencies is supported by pip, given this and this comments.
linux
Python 3.10.9
pip 22.3.1 from /home/gchapero/projects/pip-tools-bug/env/lib/python3.10/site-packages/pip (python 3.10)
pip-compile, version 6.12.3
pip-compile --extra dev -o dev-requirements.txt pyproject.toml
A dev-requirements.txt file.
dev-requirements.txt
An error.
The text was updated successfully, but these errors were encountered:
Duplicate of #1685.
Sorry, something went wrong.
Thanks for linking those comments, I had no idea listing a package as a dependency of itself might be a supported pattern.
No branches or pull requests
When trying to use layered requirements in pyproject.toml,
pip-compile
fails.Using the following
pyproject.toml
fileand running
pip-compile -o dev-requirements.txt --extra dev pyproject.toml
(same command as in the docs),pip-compile
fails withHowever trying to install the package with
pip install .[dev]
works perfectly fine.I think this usage of optional dependencies is supported by pip, given this and this comments.
Environment Versions
linux
Python 3.10.9
pip 22.3.1 from /home/gchapero/projects/pip-tools-bug/env/lib/python3.10/site-packages/pip (python 3.10)
pip-compile, version 6.12.3
Steps to replicate
pyproject.toml
file described above, runpip-compile --extra dev -o dev-requirements.txt pyproject.toml
Expected result
A
dev-requirements.txt
file.Actual result
An error.
The text was updated successfully, but these errors were encountered: