[Distutils] flit adapter for the current sdist format

Daniel Holth dholth at gmail.com
Wed Oct 28 22:51:00 EDT 2015


OK, so I wanted to see what it would take to create current-format sdists,
defined as anything that has a setup.py that pip can install by running
said setup.py. The following script takes a flit package (in the current
directory and builds a pip-installable sdist. Tested against
https://github.com/pohmelie/aioftp

https://gist.github.com/dholth/e17f243085dcc539813f

The first script is the archiver and the second script is the setup.py
embedded into the sdist by the archiver. The embedded setup.py does an
isolated install of flit into the setup-requires directory, if required,
and uses flit to implement bdist_wheel. The trick is that the only thing
pip really needs from egg_info is the current requirements, easily
generated from wheel-style .dist-info.

It might need slightly more metadata to pass on pypi and the argument
handling is inflexible, but it demonstrates most of what would be required
for a backwards compatible shim.

If our new sdist format is an even easier way to adapt new build systems
than writing this trivial setup.py shim, then we might have something.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20151029/92012c06/attachment.html>


More information about the Distutils-SIG mailing list