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

"pip wheel" does nothing if a wheel is available from PyPI #1310

Closed
rassie opened this issue Nov 8, 2013 · 25 comments
Closed

"pip wheel" does nothing if a wheel is available from PyPI #1310

rassie opened this issue Nov 8, 2013 · 25 comments
Labels
auto-locked Outdated issues that have been locked by automation C: wheel The wheel format and 'pip wheel' command type: bug A confirmed bug or unintended behavior
Milestone

Comments

@rassie
Copy link

rassie commented Nov 8, 2013

Use case: I'm preparing a wheelhouse with dependencies for our product as wheels. The installation afterwards is supposed to run only from these wheels, i.e. also with --no-index.

However, pip wheel fails to actually download a wheel if it's available from PyPI. For example, I would like to have a wheel for setuptools locally:

$ mkvirtualenv wheel
[....]
$ pip install setuptools==1.3.1 wheel https://github.com/pypa/pip/archive/develop.zip
[....]
$ pip wheel setuptools==1.3.1
Downloading/unpacking setuptools==1.3.1
  Downloading setuptools-1.3.1-py2.py3-none-any.whl (549kB): 549kB downloaded
Building wheels for collected packages: setuptools
  Skipping building wheel: https://pypi.python.org/packages/3.3/s/setuptools/setuptools-1.3.1-py2.py3-none-any.whl#md5=e39a9b0e37005b4cd5e0d328cb88fd77
Cleaning up...

I would expect pip wheel to create correct wheels in every possible way: by compiling, downloading or otherwise. It should only skip doing anything if there is a correct wheel file in the target directory.

@qwcode
Copy link
Contributor

qwcode commented Nov 8, 2013

I agree it should find the setuptools wheel and place it into your wheelhouse. marking this as a bug.

@akheron
Copy link

akheron commented Dec 3, 2013

I'm having the same issue with django-appconf.

@akheron
Copy link

akheron commented Dec 3, 2013

Actually, my problem is that I'm trying to update my wheelhouse when requirements.txt is updated. For that, I invoke pip wheel --wheel-dir=wheelhouse --use-wheel --find-links=wheelhouse. This builds all updated requirements as wheels and saves them to wheelhouse, except for those that already have a wheel available on PyPI.

@jbalonso
Copy link

jbalonso commented Dec 3, 2013

This is a bit of a brutal hack, but this is my workaround:

mkdir -p "${WHEELHOUSE}/cache"
pip wheel --use-wheel -w "${WHEELHOUSE}" -f "${WHEELHOUSE}" -r "${REQUIREMENTS}" --download-cache "${WHEELHOUSE}/cache"

echo CACHE: ${WHEELHOUSE}/cache
for x in "${WHEELHOUSE}/cache"/*.whl; do
        echo ...copying "${x##*%2F}"
        cp $x "${WHEELHOUSE}/${x##*%2F}"
done

@akheron
Copy link

akheron commented Dec 4, 2013

@jbalonso Thanks, works like a charm!

@Dr-Bean
Copy link

Dr-Bean commented Jan 2, 2014

I have a similar situation, although in our case the issue is not directly related to PyPI, but using --no-index --find-links="wheelhouse".

We have been using pip bundle for application packaging, but my goal now is to set up a central wheelhouse (similar to PyPI) to store wheels after building them.
Using a requirements file, the needed wheels should be copied from the central wheelhouse to a 'package wheelhouse', for distributing together with the application in a package, and ultimately, client-side installation. However, we run into the same message with that approach.

@GaretJax
Copy link

+1 for me as well.

@Ivoz
Copy link
Contributor

Ivoz commented Jan 24, 2014

If the behaviour were to change so that pip instead did not ignore packages already found as wheels (i.e. cache all packages requested, as wheels full stop), which I think is a more sensible and intuitive default, I'm wondering if there's a use case to warrant adding a flag to revert to the current behaviour?

@mitsuhiko
Copy link
Contributor

This is also currently different behavior than the documentation suggests.

@qwcode
Copy link
Contributor

qwcode commented Jan 25, 2014

let me add a warning in the docs for now, until this get's fixed.
(6d25e12)

@leo-the-manic
Copy link

If I'm not mistaken, this issue tracks the bug discussed in the article "Python on Wheels?" (See here)

@qwcode
Copy link
Contributor

qwcode commented Jan 29, 2014

I'm working on this, so should have a PR soon.

@qwcode
Copy link
Contributor

qwcode commented Feb 2, 2014

closing due to merge of #1524
for those following this issue, please try from the develop branch

@qwcode qwcode closed this as completed Feb 2, 2014
@Dr-Bean
Copy link

Dr-Bean commented Feb 3, 2014

Tested, works for my use-case (local wheelhouse). Downloading PyPI wheels works too. Thanks!

@Fiedzia
Copy link

Fiedzia commented Feb 7, 2014

Any chance to make 1.5.3 with this fix? Right now stable pip version is just broken, and 1.6 may be months away (guessing from release history).

@qwcode
Copy link
Contributor

qwcode commented Feb 7, 2014

@Fiedzia yes I was thinking the same (along with #1527)

@pfmoore , @dstufft thoughts?

@pfmoore
Copy link
Member

pfmoore commented Feb 7, 2014

@qwcode I'm happy enough to see a new release (but I'm not the one doing the work :-)) It would be good to get this fix into the version shipped with Python 3.4.

@dstufft
Copy link
Member

dstufft commented Feb 7, 2014

Seems reasonable to me to roll this into the 1.5.X branch.

@qwcode
Copy link
Contributor

qwcode commented Feb 7, 2014

ok, I'll push it over later.

@qwcode
Copy link
Contributor

qwcode commented Feb 8, 2014

I have the push ready, but too many problems atm, due to bitbucket being down
will wait til later.

@qwcode
Copy link
Contributor

qwcode commented Feb 8, 2014

ok, pushed to 1.5.X (along with #1527) with a successful travis build.

@sebastianneubauer
Copy link

Mmmh, this bug actually was a feature for me: I was happy that in the wheel dir only those packages ended up which are not already found somewhere (--find-links). This is really helpfull if you need to build/maintain a local (no access to pypi.python.org) wheelhouse, in my case a local devpi. Maybe it would be possible to introduce a --no-copy flag if someone only wants to have those wheels which are not already existing and just copied? Best would be if one could specify from where the wheels are copied (outside firewall e.g. pypi.python.org) and from where not (inside firewall, local wheelhouse)

@qwcode
Copy link
Contributor

qwcode commented Jul 3, 2014

a --no-copy flag seems reasonable to me.

@sublee
Copy link

sublee commented Dec 2, 2015

+1 for --no-copy.

@flaugher
Copy link

I'd like to be able to "pip wheel --wheel-dir=/path -r requirements.txt regardless of whether there's a PypI wheel so that I always have a backup I can use. I'd think this would be desirable since it would reduce PyPI traffic.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot unassigned qwcode 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 C: wheel The wheel format and 'pip wheel' command type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests