Skip to content
This repository

Allow to specify per-line --install-option in requirements.txt #271

Open
dgerzo opened this Issue April 26, 2011 · 30 comments
Daniel Gerzo

Hello,

This is a feature request, which would allow people to configure a per-line --install-option in requirements.txt for individual packages. This is needed for example when the installation of the package listed in requirements txt needs additional options, like in case of pylibmc, where I need to pass --install-option="--with-libmemcached=/usr/local" on FreeBSD systems.

Passing --install-option="--with-libmemcached=/usr/local" to the pip install -r requirements.txt is a no-go as that makes other packages fail with an unknown option. This is something that makes it difficult to use pip on automated deployments.

Thanks!

Doug Latornell

+1

I have exactly the same issue on OpenBSD deployments. Glad I checked before I wrote what would have been a duplicate enhancement request.

Day Barr

+1

I asked how to get around this limitation on StackOverflow: http://stackoverflow.com/q/8874638/445073

As well as allowing manual addition of --install-option to the requirements.txt, it would be nice to maintain the round-trip ability by having pip install "remember" what install-options were used, so pip freeze can then write the --install-option back to the requirements.txt so it isn't lost when adding new packages or upgrading existing ones.

Fredrik Jönsson

+1 I have exactly the same issue as daybarr above.

d❤vid seaward
kwill commented March 01, 2012

+1 (although I wish github had an option to show support without having to add a +1 comment - is there a feature request for this somewhere that I could add a +1 comment to?)

urbushey

+1

This would be a great feature!!!

Conrado Buhrer

+1

Carl Meyer
Owner

This is a reasonable feature, pull request welcome.

Conrado Buhrer conrado referenced this issue from a commit April 23, 2012
Commit has since been removed from the repository and is no longer available.
Mitar

+1

Ramesh nethi

+1

Grant Thomas

+1

richg

+1

Oliver Beattie

+1 (why oh why does GitHub not have a "plus one" feature)

Marcus Smith
Owner

Hello, I'm a pip maintainer and agree this is important. 1.3 is due out very soon, so it won't be in that, but it's very much on the radar for 1.4.

Eddie Welker

Awesome, thanks. +1 also.

Georgi Valkov

I'll have a go at this, but lets agree on a format first. Maybe:

# All args after '--' will be consumed and used for '--install-options'
pylibmc -- --with-libmemcached=/usr/local
# ... or more explicitly
pylibmc --install-options --with-libmemcached=/usr/local

There is also the matter of how -r --requirement lines should be handled.Should --install-options be recursively applied to all requirements in the requirement file? What if the requirements file sets install options of its own?

-r url://to/requirements.txt -- --with-libmemcached=/usr/local

Maybe I should also add line continuations to the requirement file parser?

pylibc==1.0.1 --install-options \
              --with-libmemcached=/usr/local \
              --prefix=/home/gv/.local \
              --bindir=/home/gv/.bin
distribute
Marcus Smith
Owner

I think this:

someproject==1.2 --install-option='...'

this allows us to support other options later if need be, w/o confusion.

-r url://to/requirements.txt -- --with-libmemcached=/usr/local

I'd say don't bother supporting that now. they can add the options into the lines in that file.

as for continuations, I'm open to that, but certainly not critical for this. I'd rather that be done separate.

Eddie Welker

Agree with everything @qwcode just said.

+1 Also running into this. Will be excellent when pip supports it; for now using a sort of workaround found in the comments here:
http://stackoverflow.com/questions/8874638/how-to-maintain-pip-install-options-in-requirements-file-made-by-pip-freeze

Jay Taylor

+1 this is a considerable pain in the ass

Marcus Smith
Owner
qwcode commented July 14, 2013

understood, @gvalkov 's PR is in the 1.5 milestone (i.e. the next release)

guilload

+1

ENDOH takanao

+1

I need --install-option=--static-deps option for installing lxml on Mac OS X 10.7

Mateusz Łapsa-Malawski

+1 to make graphite users happier

Almad

+1 for --egg with scons, otherwise uninstallable on heroku

Yang Xiaowei

+1

Ed Johnson

+1 causing problems installing to heroku without this.

Pablo Porto

+1

Matthew

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.