Skip to content

Install with bundle should handle requirements with version numbers #282

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

Closed
jesseh opened this issue May 9, 2011 · 17 comments
Closed

Install with bundle should handle requirements with version numbers #282

jesseh opened this issue May 9, 2011 · 17 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@jesseh
Copy link

jesseh commented May 9, 2011

When installing requirements from a bundle the version numbers are not checked. Instead, any existing version of a given package remains installed. And, including a requirements file argument to the command does have any impact. I think this is a bug because it is not consistent with the way that an install without a bundle works.

Using a bundle should work the same way as 'pip install' does when there is no bundle. Specifically, if there is a requirements file with a version number for a given package and that version of the package is included in the bundle then the required version should should be installed. If -U is included then all packages should be upgraded (as is currently the case), and if there are no requirements or a requirement with no specific version, the package from the bundle should be installed if that package has not previously been installed.

@Almad
Copy link

Almad commented Dec 2, 2011

+1 (I know, I don't have patch...but there is no voting system ;))

@sblask
Copy link

sblask commented Mar 11, 2013

Possibly related to #838 ?

@Diaoul
Copy link

Diaoul commented Jun 2, 2013

I can't believe this isn't fixed. I have the same issue and no easy way to fix it.
Any updates?

@dholth
Copy link
Member

dholth commented Jun 4, 2013

The bundle feature will be removed entirely.

@dholth dholth closed this as completed Jun 4, 2013
@Diaoul
Copy link

Diaoul commented Jun 4, 2013

What's the alternative?

@sblask
Copy link

sblask commented Jun 5, 2013

pip wheel is the proposed alternative. I didn't try it because it hasn't been released yet, but it should create wheels of your package and all its requirements and collect them into one directory. So you'll have a bunch of files instead of one, but you should be able to do the same things...

@Diaoul
Copy link

Diaoul commented Jun 5, 2013

wheel is doing bdist not sdist, thus pre-compiled packages. That's not suitable for distribution on multiple platforms with different architectures AFAIK.
New cool feature for sure that works in mosts cases but not really an alternative.

@pfmoore
Copy link
Member

pfmoore commented Jun 5, 2013

For a sdist equivalent, the idea is that you can just use a directory of sdists plus a requirements file, with --no-index and --find-links arguments (probably specified in the requirements file itself).

@Diaoul
Copy link

Diaoul commented Jun 5, 2013

I'll end up doing that, the bundle was easy to create and install. Upstream doesn't always provide requirements files and including recursive dependencies manually is a PITA.
What is the easy way to create "a directory of sdists" that contains some (say two) packages + recursive dependencies?

@pfmoore
Copy link
Member

pfmoore commented Jun 5, 2013

pip install -d sdist_dir package

This will download any dependencies as well. I believe it handles recursive dependencies automatically, but I don't have an example. If you can provide an example (that works on Python 3 on Windows) I can check, but I guess you can check for yourself just as easily...

@sblask
Copy link

sblask commented Jun 5, 2013

@Diaoul: Agreed, installing stuff is easy, but creating a list of requirements is hard. If I have to maintain a requirements file, I have to use something on top of setup.py. Just having it work was the biggest advantage of virtualenv/pip...

@sblask
Copy link

sblask commented Jun 5, 2013

@pfmoore: at least with version 1.1 and 1.3.1 this:

pip install --download DOWNLOAD_DIRECTORY --no-install PATH_TO_LOCAL_CHECKOUT

gives me:

[Errno 2] No such file or directory: '/tmp/pip-dRufKM-build/setup.py'

a normal install works flawlessly. Omitting --no-install doesn't change anything.

@pfmoore
Copy link
Member

pfmoore commented Jun 5, 2013

OK, I have no idea regarding local checkouts. I don't use them like that so I can't comment. Thanks for clarifying.

@dholth
Copy link
Member

dholth commented Jun 5, 2013

@Diaoul
Copy link

Diaoul commented Jun 5, 2013

The example in the docs requires a requirements.txt, if that runs without -r requirements.txt then that's fine for me.

@qwcode
Copy link
Contributor

qwcode commented Jun 5, 2013

you can use --download with normal requirement specifiers, in addition to using requirements files.

e.g. pip install --download=/tmp/archives/ SomePackage
will download an archive for SomePackage and all it's dependencies, w/o regard to what's installed.
(--no-install is not needed)

@sblask
Copy link

sblask commented Jun 7, 2013

See #831 for the problem I mentioned earlier.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 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

7 participants