Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency install order is 'broken' #3966

Closed
MMeent opened this issue Sep 14, 2016 · 5 comments
Closed

Dependency install order is 'broken' #3966

MMeent opened this issue Sep 14, 2016 · 5 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@MMeent
Copy link

MMeent commented Sep 14, 2016

  • Pip version: 8.1.2
  • Python version: 3.5
  • Operating System: Windows, Linux (Debian, Ubuntu)

Description:

For our Django project we have a few dependencies which we want to install using PIP. Most dependencies work normally on both operating systems, but not all.

Specifically I'm speaking about the rcssmin and rjsmin modules, which are required by the 'django-compressor'-library. These do not install normally on windows, but using --install-option="--without-c-extensions" made those two install just fine. Including this into the head of our windows requirements file does not make PIP use these flags while installing these modules. This means that we have to run the pip requirements command 2 times instead of one, which is not terrible but annoying.

Something that would fix this annoyance is that in the requirements file your -r <filename> includes are evaluated only after the other requirements in that file, or (an optional flag for) that requirements are installed in the order the file specifies.

What I've run:

~>pip --version
pip 8.1.2 from C:\Python35\lib\site-packages (python 3.5)

~>cat requirements-windows.txt
## first install rcssmin and rjsmin without c extensions to ensure it won't fail
rcssmin==1.0.6 --install-option="--without-c-extensions"
rjsmin==1.0.12 --install-option="--without-c-extensions"

~>cat requirements.txt
## Django 1.9+ and utils
Django>=1.9
docutils>=0.12
django-auth-ldap>=1.2.7

## django-compressor for sass compiling and ES6 compiling
django-compressor>=2.0
django-compressor-toolkit==0.5.0
@piotr-dobrogost
Copy link

All packages are being installed in topological order – see issue #2478 – and that's how it should be.
According to Per-requirement Overrides passing --install-option is supported so it should work...
Btw, the list of supported options in Requirements File Format section does not include --install-option nor --global-option mentioned in the Per-requirement Overrides section.

@MMeent
Copy link
Author

MMeent commented Sep 16, 2016

The --install-option="without-c-flags" option works in a requirements file with pip install -r, so the problem is just that we cannot say "install this package before the others (with these options)".

Installing packages manually makes this possible, so why not allow an automated way?

If I cannot set the order of installation, can you please update the docs on requirements file from "list of items to be installed" to "set of requirements to be installed in topological, then undetermined order"? This would clear up the misunderstanding that the order of input makes a difference (list implies order implies control of order, which it doesn't have). Although the docs to warn about this not being true, the correct word for something makes a difference.

@dstufft
Copy link
Member

dstufft commented Sep 16, 2016

We don't promise anything about what order packages are installed (or built) in. They might even be built in parallel at some point in the future. I'm fine if someone wants to submit a PR to change "list" to "set" but I wouldn't want to document what the current order is (because it can change at any time).

@piotr-dobrogost
Copy link

@MMeent
Your use of specific requirement file for Windows is a workaround and the real issue is not the fact you can't define the order of installation but that these two packages (rcssmin, rjsmin) do not have their dependencies fully specified. The tricky part here is that dependencies here mean different setuptools option passed which is rather seldom situation I guess. The question is if there is any way to pass different setuptools options based on platform?

@xavfernandez
Copy link
Member

Like Donald said, pip install order should not be relevant.
I'm closing this.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

4 participants