Wheels are a well-known part of the Python packaging ecosystem at this point! Many tutorials, gists, and other tools suggest to build wheels using setuptools and distutils, but may not remind users to install the wheel package. In light of Issue 31634 being temporarily suspended and given that this does not interfere with experienced users implementing their own bdist_wheel command, it should be a welcome addition to help guide novice packagers in the right direction. Result for a Python environment without the `wheel` package installed: $ python3 setup.py bdist_wheel usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: invalid command 'bdist_wheel' note: The wheel package provides this command. See https://packaging.python.org/tutorials/distributing-packages/#wheels for information on packaging wheels
I don’t know that bdist_wheel integrates with pure distutils without setuptools. I think this PR should target setuptools (it will also make it propagate to users faster and regardless of Python version).
bdist_wheel is implemented as a distutils.core.Command, see https://github.com/pypa/wheel/blob/3a87ecebaba765475392ae2cdfa2a51cb78360e0/wheel/bdist_wheel.py I was unable to find a good place to transparently hook in and catch the missing command class, but I agree that setuptools would be a far faster avenue to get this out to users. Alternatives include: 1) implementing bdist_wheel as a command in setuptools... which would have to get out of the way or call the real command when the wheel package is installed. 2) trying to get wheel merged into setuptools, which would be a much larger project. I'll see what option 1 looks like!
The devs probably choose to use distutils.Command as base class for maximum compatibility, but I suspect 99.99% of users use the setuptools integration (entry points https://github.com/pypa/wheel/blob/3a87ecebaba765475392ae2cdfa2a51cb78360e0/setup.py#L53-L54 ) rather that distutils integration (explicit cmd_class setting in setup.py or --command-packages on the command line) I’m inclined to reject the special case in distutils and encourage you to send the patch to setuptools (a similar PR, not option 1 or 2).
status: pending -> opentitle: User friendly message when invoking bdist_wheel sans wheel package -> User friendly message when invoking bdist_wheel sans wheel package.
2017-12-23 23:03:11
eric.araujo
set
status: open -> pendingresolution: wont fixmessages: +