dependencies ignored when --root is used
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Hey,
This definitely seems like a bug, as I can find no reference to it (nor does it make sense) as a feature.
Issue:
When "--root" is used with setup.py (required for system package installs, e.g. RPM), dependencies listed in setup.py are ignored.
Steps to reproduce:
- Create a virtualenv
- Download a package with dependencies, like cryptography
- Run python setup.py install --root=anywhere
Observe that no dependencies are installed, even though listed.
Null Test:
- Create a virtualenv
- Download a package with dependencies, like cryptography
- Run setup.py install
Observe that dependencies ARE installed in this case.
What I would expect:
Either setup.py errors out that dependencies are missing (preferred), or it attempts to install the dependency packages into the same root.
Why this matters:
When creating RPMs or pacman pkgs of python packages (very common for production environments), you must install relative to the package root.
For example:
python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
However, without dependency enforcement, the requirements of a package may change, and it will build without error, but portions of the installed module that reference the new requirements will fail.
If yall don't agree that the default behaviour should change, at least maybe we should add an argument like --ensure-deps which will error out if those dependencies are missing.
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.
Research direction
Start by reproducing the two setup.py install commands with --root and without it using a package such as cryptography. Trace the dependency handling for the --root path; done means dependencies are either installed into the same root or the command clearly errors when they are missing, with regression coverage for both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100