AcademySoftwareFoundation / AcademySoftwareFoundation/rez
Unable to Install Pylint with `rez pip`
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 374
- Avg merge
- 9d 12h
- Merged PRs (30d)
- 5
Description
I am unable to install Pylint using `rez pip` on either OSX or Windows;
```
rez pip -i -v -v -v -v pylint
...
Installing collected packages: toml, lazy-object-proxy, wrapt, six, astroid, colorama, isort, mccabe, pylint
Successfully installed astroid-2.4.2 colorama-0.4.4 isort-5.7.0 lazy-object-proxy-1.4.3 mccabe-0.6.1 pylint-2.6.0 six-1.15.0 toml-0.10.2 wrapt-1.12.1
...
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\rez\2.72.0\Scripts\rez\rez.exe\__main__.py", line 7, in
File "c:\rez\2.72.0\lib\site-packages\rez\cli\_entry_points.py", line 64, in run_rez
return run()
File "c:\rez\2.72.0\lib\site-packages\rez\cli\_main.py", line 170, in run
returncode = run_cmd()
File "c:\rez\2.72.0\lib\site-packages\rez\cli\_main.py", line 162, in run_cmd
return func(opts, opts.parser, extra_arg_groups)
File "c:\rez\2.72.0\lib\site-packages\rez\cli\pip.py", line 70, in command
pip_install_package(
File "c:\rez\2.72.0\lib\site-packages\rez\pip.py", line 324, in pip_install_package
distributions = list(distribution_path.get_distributions())
File "c:\rez\2.72.0\lib\site-packages\rez\vendor\distlib\database.py", line 213, in get_distributions
self._generate_cache()
File "c:\rez\2.72.0\lib\site-packages\rez\vendor\distlib\database.py", line 167, in _generate_cache
for dist in self._yield_distributions():
File "c:\rez\2.72.0\lib\site-packages\rez\vendor\distlib\database.py", line 148, in _yield_distributions
metadata = Metadata(fileobj=stream, scheme='legacy')
File "c:\rez\2.72.0\lib\site-packages\rez\vendor\distlib\metadata.py", line 741, in __init__
self._legacy = LegacyMetadata(fileobj=StringIO(data),
File "c:\rez\2.72.0\lib\site-packages\rez\vendor\distlib\metadata.py", line 285, in __init__
self.read_file(fileobj)
File "c:\rez\2.72.0\lib\site-packages\rez\vendor\distlib\metadata.py", line 383, in read_file
self.set(field, value)
File "c:\rez\2.72.0\lib\site-packages\rez\vendor\distlib\metadata.py", line 478, in set
if not scheme.is_valid_constraint_list(value):
File "c:\rez\2.72.0\lib\site-packages\rez\vendor\distlib\version.py", line 713, in is_valid_constraint_list
return self.is_valid_matcher('dummy_name (%s)' % s)
File "c:\rez\2.72.0\lib\site-packages\rez\vendor\distlib\version.py", line 703, in is_valid_matcher
self.matcher(s)
File "c:\rez\2.72.0\lib\site-packages\rez\vendor\distlib\version.py", line 115, in __init__
raise ValueError('\'.*\' not allowed for '
ValueError: '.*' not allowed for '>=' constraints
```
To be fair, I'm not sure how much this is a problem with rez itself; something in the pylint stack seems to be requesting `dummy_name>=3.5.*` and it is that version range that is causing the problem. At the same time, a straight pip install of pylint does not encounter any problems.
Contributor guide
Research direction
Reproduce the command `rez pip -i -v -v -v -v pylint` on OSX or Windows, then inspect `rez/cli/pip.py`, `rez/pip.py`, and the vendored `distlib` files named in the traceback. Trace how the pylint dependency metadata reaches `is_valid_constraint_list`; done means the command completes without the reported ValueError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100