`extras_require` ignores version specifier
See original GitHub issue- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: MacOS 10.15
- Poetry version: 1.1.2
- pyproject.toml / setup.py: https://gist.github.com/Fizzadar/a1b98304a2b86ee966dedea6479320bd
Issue
The extras_require
in the generated setup.py
ignores the version specified in the pyproject.toml
, leading to inconsistent/broken builds when installing a package with extras.
Gist above contains full info, but specifically:
[tool.poetry.dependencies]
kombu = {version = '^=4.5', optional = true}
[tool.poetry.extras]
queue = ['kombu']
Becomes:
extras_require = \
{'queue': ['kombu']}
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Adding a default extra_require environment - Packaging
We just need to allow users to create an environment called None. For now the following will fail: from setuptools import setup extras_require...
Read more >How to specify platforms-specific extras or version in Pipfile?
It's not clear what to do when one wants to specify different version or options for a package, depending on the platform. Specifically,...
Read more >setup.py vs setup.cfg in Python - Towards Data Science
python_requires : This is a comma-separate string that contains version specifiers for the Python version supported by the package. install_requires : A list...
Read more >PDM - The Blue Book - GitHub Pages
If the package is given without a version specifier like pdm add requests . ... to tell PDM to ignore the version specifiers...
Read more >setuptools.txt
``extras_require`` A dictionary mapping names of "extras" (optional features of your ... Version specifiers for a given project are internally sorted into ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Fizzadar you can add the following to your
pyproject.toml
to avoid this altogether. Poetry will stop generating setup files by default in coming release.This issue is a big misunderstanding, the actual problem is this bogus version
^=4.5
if you replace that with
^4.5
which is presumably what was intended then the requirement comes out as'kombu>=4.5,<5.0'
.so it would still be nice if poetry rejected the bad version rather than somehow interpreting it as being
*
: but that’s the real problem.