[Distutils] build a wheel with waf instead of setuptools
dholth at gmail.com
Fri Jul 25 16:21:45 CEST 2014
On Fri, Jul 25, 2014 at 10:20 AM, Donald Stufft <donald at stufft.io> wrote:
> On July 25, 2014 at 10:03:01 AM, Daniel Holth (dholth at gmail.com) wrote:
> 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.
>> 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
>> 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
> I don’t think there is any plans to tell pip *not* to use a setup.py and to
> use a Wheel instead. Rather I think the plans are to enable pluggable
> builders so that a sdist 2.0 package doesn’t rely on setup.py and could use
> a waf builder (for instance) plugin.
Just a flag that tells pip it can't use the "install" command and has
to do package -> install package on an sdist.
More information about the Distutils-SIG