0

I was under the impression that the bdist_wheel command would produce appropriately named platform wheels for Python packages (https://packaging.python.org/tutorials/distributing-packages/). I've noticed however that it doesn't behave quite as advertised. Take this sample Python project (and thanks to the creator!):

https://github.com/pypa/sampleproject

I'm using anaconda and Python 3. I create a virtual environment, and then run the bdist_wheel command.

conda create --name sampleproject python=3.6
source activate sampleproject
python setup.py bdist_wheel

The last bit of the output from the setup command is as follows:

Copying sample.egg-info to build/bdist.macosx-10.7-x86_64/wheel/sample-1.2.0-py3.6.egg-info
running install_scripts
creating build/bdist.macosx-10.7-x86_64/wheel/sample-1.2.0.dist-info/WHEEL

But the resulting platform bdist directory is actually empty:

ls -c build/bdist.macosx-10.7-x86_64 | wc -l
0

I've confirmed this behavior with two other real projects. What's the deal here? Is the bdist_wheel command just broken? I've confirmed that the wheel module is installed:

pip (9.0.1)
setuptools (27.2.0)
wheel (0.29.0)

Is there some other requirement for building platform wheels?

robo
  • 55
  • 5
  • I can't reproduce this; on my Mac, the `dist` directory contains the `sample-1.2.0-py2.py3-none-any.whl` file (there is no subdirectory). – darthbith Aug 25 '17 at 21:52
  • Oh, maybe you're looking in the wrong place? Do you have a `dist` directory? – darthbith Aug 25 '17 at 21:53
  • Oh, indeed I do! And I see a wheel file there (sample-1.2.0-py2.py3-none-any.whl). Does the wheel file that it reports to have created (build/bdist.macosx-10.7-x86_64/wheel/sample-1.2.0.dist-info/WHEEL) get renamed? Is there a way to force create a platform wheel w/ the platform name as part of the artifact? – robo Aug 26 '17 at 03:37
  • The problem that prompted the question was that setuptools was not preserving the platform-specific name of the dist artifact. The solution appears to be to customize the distclass parameter to setup as outlined here: https://stackoverflow.com/questions/35112511/pip-setup-py-bdist-wheel-no-longer-builds-forced-non-pure-wheels – robo Aug 26 '17 at 06:24

0 Answers0