Re: Setuptools adopts distutils
Paul Ganssle <[email protected]> Mon, 13 Jul 2020 10:26:30 -0400
| Newsgroups | gmane.comp.python.distutils.devel |
|---|---|
| Message-ID | <[email protected]> |
I don't think setuptools actually /does/ rely on the distutils from the standard library. One of the first things setuptools does is replace the distutils module in sys.modules with setuptools._distutils <https://github.com/pypa/setuptools/blob/37d81f4ce8f08c4baf44b6ff0f3f1bd3f6b2a127/setuptools/__init__.py#L7>. Anywhere else in the codebase that you see any variation on import distutils, you /should/ get code exclusively from setuptools._distutils. I believe we're disconnecting from distutils and replacing it. I think we should be able to deprecate distutils in Python 3.10. I don't think there's ever been explicit agreement on this point, but my understanding is that we're planning on moving everything from the distutils namespace into setuptools (and we're in the very long and drawn-out process of a massive widdling-down of the functions setuptools / distutils provides, so you can rest assured we'll be deprecating the pointless stuff). Best, Paul On 7/13/20 9:57 AM, Matthias Klose wrote: > On 7/3/20 5:18 PM, Jason R. Coombs wrote: >> I’m pleased to announce the release of Setuptools 48, which adopts the distutils codebase from CPython per pypa/setuptools#417<https://github.com/pypa/setuptools/issues/417> and pypa/packaging-problems#127<https://github.com/pypa/packaging-problems/issues/127>. >> >> Given the amount of change this effort involved, it’s likely unstable and thus the major version bump. Please report issues at the Setuptools issue tracker. I’ll be around today (IRC, Gitter, Slack) to either disable the functionality or add an escape hatch if needed. > Thanks for doing that! > > At the Python language summit in 2018, I proposed to deprecate and maybe remove > distutils from CPython. When looking at setuptools 49.3, I see that > setuptools/_distutils still relies on distutils as distributed in CPython. Is > this really wanted? I see distutils / setuptools mostly as a build time tool, > which doesn't have to be installed at runtime, that's why you have a separate > binary package in Debian/Ubuntu, called python3-setuptools. > > Examples for unexpected / creative usages, which are unrelated to building a > package are: > > - distutils.version > Used “everywhere”, moved back to the python package in Debian/Ubuntu. > This maybe should be replaced by using distlib.version. > > - distutils.spawn: find_executable > Replace with shutil.which, this can definitely go, because there's > a replacement in the Python3 standard library, and starting with > 48.x, setuptools only targets Python3. > > - distutils.util: strtobool > Rewrite, no equivalent in the stdlib? > > - distutils.sysconfig: > Mostly replaced by sysconfig > > Maybe I'm missing something, but as I currently see setuptools it has to follow > CPython's ongoing changes in distutils, without an option to deprecate distutils > any time soon, and it still provides things which from my point of view, it > shouldn't provide. > > Matthias > -- > Distutils-SIG mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/distutils-sig.python.org/ > Message archived at https://mail.python.org/archives/list/[email protected]/message/NXR4ZWO23FWDAN65ZFOPORLHU44ARS2V/ -- Distutils-SIG mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/distutils-sig.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/45DAK4HPPQ4KYDIH2CZT3NC3H5BTKGXZ/
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa0msutz2vRyiBmerzVT849lkvvsFAl8MbxYACgkQzVT849lk vvu7Rw/9ERucEmq5Y29ArW8B3BY6MHjx8xdzqzHshMlYcdb4JvjE41emcdE/c2N8 qCjB8CtqUYuaFfa9sxiQzi4tJ7iZ72uLeplShDnXwkzE8m/QW5ADVnC2HMhg9k0z yOwA0WXx1AwjGRmjneEsn6vll70rMw8bnqUHYmvsR2lZOApnWVkjbp20YinbA+4E jMT4GsoXKSLZbprZEnlyDn3QrQc23jSneMZxbZt0BCk+7mMvlfdtrQG46LqUp3qu XXIWZq1LgD8iCPv4R/IS8XZtf+EAuJ3gUqkKDlzbOnIvLhSKtiZJoAMu5kmWKLj9 qU+Lg9r3CzYjnivrDU52MGE6yFxZ6rF/AdiBBK17ElMhGkUTlbkPJcl9zZ19BVHz T7OJLIWbpOikXW6ytBAKMyJIPCP3UxcMsoOrSKgfT1itTeHS4bCxNNY+RKbrSkOX 15CD5ULQEDzj/Ho4xg6AetTKxRUVSxvQmxaDRaUXAcwKX/0wxurNzy8fjUMt6sTb s5LfeXC+L6oJQXg1I4r6stcMrp4gWJ3MRK+LdkwuRFACIsZr8xzMd2lZu/EZo61x k3/sw2gFp8X/xi0kkjMIlOVAfmfht4TbUD6EbivvNWqqGTW6AXFz9/yyz98va0LB Q+JdLaBNvtPgStbp49KMo7Bm2Md9Bm6KsFtn8JRs/vcPxWbeNbU= =SI9Q -----END PGP SIGNATURE-----