[Distutils] Extracting distutils into setuptools

Donald Stufft donald at stufft.io
Fri Sep 29 23:15:16 EDT 2017



> On Sep 29, 2017, at 5:16 PM, Steve Dower <steve.dower at python.org> wrote:
> 
> I'm happy enough with this approach, my only problem with it is that I don't want to be maintaining two versions (the new one that we want people to change to, and the old one so that people keep working with new versions of Python without having to change to the new one).
> 
> If we don't make a very clear statement that "distutils is no longer being maintained, it probably won't build valid extensions on 3.[7/8/whatever], and we mean it this time" then it doesn't count. I insist on at least removing the distutils tests from the test suite, since as long as those need to pass I can never stop maintaining the stdlib version. And that puts this in the realm of python-dev, which means a PEP to formally deprecate distutils (that I'm happy to co-author) and recommend an alternative, as well as the alternative path needed to build the core extension modules on non-Windows platforms.

As long as CPython itself depends on distutils I don’t think we can break or remove distutils, but we can move make it a shim over something that is better architecturally and easier to maintain. The tests should still pass in this case because they’d essentially be testing that our shim is functioning correctly.

I also don’t think we can spin distutils out of the stdlib as long as CPython depends on it.

I see two paths forward:

1) We come up with something better *in the standard library*, implement it, move CPython to using that in the build process, and then deprecate/remove distutils from the stdlib and have it maintained outside.

2) We come up with something better outside of the standard library, implement it, vendor it into distutils/_whatevercoollib, and turn the relevant distutils APIs into shims over the new API.


Of the two, I think that (2) is going to be the least painful for users.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20170929/0014435f/attachment-0001.html>


More information about the Distutils-SIG mailing list