python setup.py install doesn't install requirements that are also setup_requires.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PBR |
Fix Released
|
High
|
Unassigned |
Bug Description
Given the template setup.py:
setup(
pbr=True,
)
And a requirements.txt of:
pbr>=0.6,<1.0
# other packages go here
pbr is first downloaded by setuptools and installed to ./pbr-0.
This is correct according to the description of setup_requires - http://
When pip processes install_requires:
Requirement already satisfied (use --upgrade to upgrade): pbr>=0.6,<1.0 in ./pbr-0.
which may be so, but it's not in site-packages and not in the pythonpath and as such an application that uses `pbr.version` will error out with:
ImportError: No module named pbr.version
Of course, the workaround is:
pip install -r requirements.txt && python setup.py install
But I think it would be good if manually installing requirements.txt was not necessary
Environment:
- Python 2.7.8
- pip (1.5.6)
- setuptools (5.4.1)
- virtualenv (1.11.5)
- Mac OS X 10.9.2
Changed in pbr: | |
status: | New → Incomplete |
Changed in pbr: | |
status: | Invalid → Confirmed |
After a package is installed you can use pkg_resources. get_distributio n(name) .version to find the version. Can you use that as a work-around, since the underlying problem here is really with setuptools?