[Distutils] build a wheel with waf instead of setuptools

Daniel Holth dholth at gmail.com
Fri Jul 25 16:02:28 CEST 2014

On Fri, Jul 25, 2014 at 5:51 AM, Daniel Holth <dholth at gmail.com> wrote:
> Here's a little something I cooked up based on the waf (a build
> system) playground/package example. It's a build script for wheel
> (what else) that builds a .whl for wheel when you run "waf configure"
> and then "waf package" with waf 1.8.0. I've tested it in Python 2.7.
> Waf is a build system that, unlike distutils, won't fall over
> immediately when you try to extend it. One of its features is support
> for building Python extensions, and it is itself written in Python.
> Right now for expedience instead of generating the METADATA or
> entry_points.txt from setup() arguments it just copies them from files
> at the root, and the command "waf dist" (for producing sdists)
> includes too many files but that is easy to fix. In particular I liked
> using ant_glob() a lot better than MANIFEST.in. The wscript does not
> use MANIFEST.in.
> https://bitbucket.org/dholth/wheel/src/1bbbd010558afe215a01cfd238a26da42ad60802/wscript
> If there are any interested waf-wizards out there then we could take
> the wheel building feature and pull it out of the individual wscript,
> refine it a bit, and have another non-distutils way to publish Python
> packages.
> Daniel Holth

This kind of thing will require us to implement a flag that tells pip
"setup.py cannot install; go through wheel" which is somewhere in the

More information about the Distutils-SIG mailing list