Mixed environment markers in extras produces mangled results
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- build-system
Research direction
Reproduce the issue from the setup.py example by running setup.py -q egg_info and inspect foo.egg-info/requires.txt. Trace how markers from the extra name and requirement are combined; done means the generated metadata contains valid combined marker syntax or rejects the mixed input clearly.
Written by the indexing model from the issue text.
Description
Creating a project that provides environment markers in both the extra name and in the requirements list produces mangled results in the metadata.
Example:
draft $ cat setup.py
import setuptools
setuptools.setup(
name='foo',
extras_require = {
'pyarrow: python_version >= "3.4"': [
'pyarrow >= 1.0.0, < 2.0dev; python_version >= "3.5"',
],
},
)
draft $ pip-run -q setuptools -- setup.py -q egg_info
WARNING: You are using pip version 20.1.1; however, version 20.2.2 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m pip install --upgrade pip' command.
draft $ cat foo.egg-info/requires.txt
[pyarrow: python_version >= "3.4"]
[pyarrow: python_version >= "3.4":python_version >= "3.5"]
pyarrow<2.0dev,>=1.0.0
Note python_version >= "3.4":python_version >= "3.5" is invalid environment marker syntax.
Setuptools should produce valid syntax by combining the two sets of markers with and or error if markers are specified in both places.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pypa/setuptools
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pypa/setuptools#5272 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
pypa/setuptools#5235 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pypa/setuptools#5234 · 1 comment ·
-
bug Needs Triage
Difficulty 1/5 Under an hour Newbie friendliness 78/100
pypa/setuptools#4135 · 1 comment · 1 reaction ·
-
documentation Needs Triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
pypa/setuptools#2753 ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100