[Distutils] Extracting distutils into setuptools

Donald Stufft donald at stufft.io
Sun Oct 1 14:55:39 EDT 2017



> On Oct 1, 2017, at 1:53 PM, xoviat <xoviat at gmail.com> wrote:
> 
> After thinking again about that possibilities that we've discussed here, I realized that a previously proposed alternative would eliminate external build-time dependencies and allow us to merge setuptools with distutils: an "ensuresetuptools" module. This was proposed by @zooba, but basically the idea would be to bundle a wheel of setuptools (setuptools is py2.py3.none-any) that Python could install without requiring network access or other modules. If distutils is required during the build process, then this idea should conform to all of the requirements proposed here and take distutils off of the CPython release schedule.


This isn’t as easy as ensurepip, because ensurepip can wait until the end of the build process when the entire Python installation has been built. The same isn’t true for a hypothetical ensuresetuptools module. This is because we end up in a circular dependency, if installing a wheel requires a C extension (like say zlib) then we can’t install that wheel prior to building zlib, but if we need to install that wheel to build zlib then we end up stuck.

I’m not sure what all c-extensions are used in the process of installing a wheel— certainly zlib is but we could maybe build a special wheel that only uses the STORED algorithm and doesn’t do compression (does the zipfile module work with zlib doesn’t exist?). I’m going to guess there are others though and no idea if they are able to be avoided.

I still think a better idea if we want to go down that route is to modify the CPython build process to not depend on distutils at all.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20171001/75589eeb/attachment.html>


More information about the Distutils-SIG mailing list