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

Error: Wheels are not supported with setuptools 38.2.0 #425

Closed
mgedmin opened this Issue Nov 27, 2017 · 7 comments

Comments

Projects
None yet
4 participants
@mgedmin
Copy link
Member

mgedmin commented Nov 27, 2017

Yesterday setuptools 38.2.0 came out with this interesting new feature:

  • pypa/setuptools#1200: easy_install now support installing from wheels: they will be installed as standalone unzipped eggs.

Since then all my Jenkins jobs that run bin/buildout started failing with the following error

Getting distribution for 'zope.testrunner==4.7.0'.
Using unpack_wheel() shim over the deprecated wheel_to_egg() hook.
Please update your wheel extension implementation for one that installs a .whl
handler in zc.buildout.easy_install.UNPACKERS
While:
  Installing.
  Getting section test.
  Initializing section test.
  Installing recipe zc.recipe.testrunner.
  Getting distribution for 'zope.testrunner==4.7.0'.
Error: Wheels are not supported

Note: I'm not using buildout.wheel, and I've pinned the versions of every dependency and recipe, except for setuptools.

@reinout

This comment has been minimized.

Copy link
Contributor

reinout commented Nov 27, 2017

I have the same issue on jenkins (also no buildout.wheel). I haven't been able yet to get it to fail locally.

@reinout

This comment has been minimized.

Copy link
Contributor

reinout commented Nov 27, 2017

Setuptools suddenly unexpectedly downloads a .whl as it now supports that. Buildout sees it and wants to use some wheel-installer. Which isn't there. So it fails with the "Wheels are not supported" error message.

@reinout

This comment has been minimized.

Copy link
Contributor

reinout commented Nov 27, 2017

I did a quick test by hacking a local copy of buildout and changing this in easy_install.py:

UNPACKERS = {
    '.egg': unpack_egg,
    '.whl': unpack_egg,  # was: unpack_wheel
}

So now setuptools gets to install the wheel it downloaded in the first place.

Looks like it works like a charm. Quick test with numpy works, too.

@mgedmin

This comment has been minimized.

Copy link
Member Author

mgedmin commented Nov 27, 2017

To get it to fail locally, run bin/buildout buildout:eggs-directory=/tmp/new-empty-eggs-dir buildout:download-cache=.

@leorochael

This comment has been minimized.

Copy link
Contributor

leorochael commented Nov 29, 2017

If we could feature-detect if setuptools supports wheel, we could switch at import time which unpack_x function to use for wheels.

@reinout

This comment has been minimized.

Copy link
Contributor

reinout commented Nov 29, 2017

I think I've found the easiest solution with #428

By default, the unpack_wheel() refuses to work, printing "wheels are not supported".
The new default is to let setuptools handle it.
The new default will only fire if a wheel is actually downloaded, which only happens when there's a new setuptools.

So.... ought to work!

@davisd50

This comment has been minimized.

Copy link

davisd50 commented Dec 1, 2017

I just had to set the setuptools version in the virtual environment:

When creating a virtualenv:
virtualenv --no-setuptools myenv
. myenv/bin/activate
pip install setuptools=="38.1.0"

My build started working then.

@reinout reinout closed this in #428 Dec 4, 2017

reinout added a commit that referenced this issue Dec 4, 2017

Merge pull request #428 from buildout/reinout-wheel-via-setuptools
Install wheels via setuptools, fixes #425

hvelarde added a commit to plonegovbr/portal.buildout that referenced this issue Dec 11, 2017

hvelarde added a commit to plonegovbr/portal.buildout that referenced this issue Dec 11, 2017

hvelarde added a commit to plonegovbr/portal.buildout that referenced this issue Dec 11, 2017

hvelarde added a commit to plonegovbr/portal.buildout that referenced this issue Dec 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.