[Distutils] build a wheel with waf instead of setuptools

Donald Stufft donald at stufft.io
Fri Jul 25 16:20:32 CEST 2014


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. 
> 
> 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 
plans.. 
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.

-- 
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20140725/e6ac97d0/attachment-0001.html>


More information about the Distutils-SIG mailing list