AcademySoftwareFoundation / AcademySoftwareFoundation/rez
rez cant find packaged pip
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 374
- Avg merge
- 9d 12h
- Merged PRs (30d)
- 5
Description
Hi,
We have python and pip as packages (separate). When using rez-pip, the packaged pip is not found.
The problem is [this line here](https://github.com/nerdvegas/rez/blob/d392c65bf63b4bca8106f938cec49144ba54e770/src/rez/pip.py#L220) which tries to get full version of pip but it can't because python run in subprocess does not get pip module. The -E flag disables PYTHONPATH which is how we add pip module though the package in the first place.
```
name = 'pip'
version = '21.3.1'
description = ''
requires = []
build_requires = []
private_build_requires = []
variants = [['platform-windows', 'python-3.7']]
def commands():
env.PYTHONPATH.append("{this.root}/Lib/site-packages")
```
So basically rez finds both python and pip packages, resolves context, runs python executable in that context but takes out pip and than says "nope, didnt find it" 🤷♂️
Related issue: #706
Related PR: #757
Contributor guide
Research direction
Start with src/rez/pip.py around line 220 and reproduce the packaged Python and pip setup shown in the issue using rez-pip. Compare the resolved context with the subprocess environment and review related issue #706 and PR #757. Done means rez-pip can locate the packaged pip module in this context and the relevant behavior is covered by the project’s existing checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100