AcademySoftwareFoundation / AcademySoftwareFoundation/rez
rez-pip does not account for python versions having differing requires
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 374
- Avg merge
- 9d 12h
- Merged PRs (30d)
- 5
Description
As an example, take cmd2-0.8.9, since this happened to be the one I installed when I discovered this. If you read the Metadata, you'll see this:
```
Requires-Python: >=2.7
Requires-Dist: pyparsing (>=2.0.1)
Requires-Dist: pyperclip
Requires-Dist: six
Requires-Dist: subprocess32; python_version<'3.0'
Requires-Dist: enum34; python_version<'3.4'
Requires-Dist: contextlib2; python_version<'3.5'
```
I was installing versions for python-2.7 and python-3.7, and my package.py came out looking like this:
```
requires = [
'contextlib2',
'enum34',
'subprocess32',
'six',
'pyperclip',
'wcwidth',
'pyparsing-2.0.1+'
]
variants = [
['python-2.7'],
['python-3.7']
]
```
My python-3.7 cmd2 rez-env now fails to resolve, because I don't have contextlib2, enum34 or subprocess32 packages for python-3.7.
Contributor guide
Research direction
Start at the rez-pip entry point that reads Requires-Dist metadata, using the generated package.py and the cmd2-0.8.9 example. Compare dependency handling for the python-2.7 and python-3.7 variants. Done means conditional requirements are included only for compatible Python versions, so the python-3.7 environment does not require unavailable packages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100