> The entire distutils package is deprecated, to be removed in Python 3.12.<p>Wait, what?<p><a href="https://www.python.org/dev/peps/pep-0632/" rel="nofollow">https://www.python.org/dev/peps/pep-0632/</a> says:<p>> Setuptools has recently integrated a complete copy of distutils and is no longer dependent on the standard library [3]. Pip has been silently replacing distutils with setuptools when installing packages for a long time already, and the distutils documentation has stated that it is being phased out since 2014 (or earlier). It is time to remove it from the standard library.<p>Oh, okay. My package already requires setuptools for setup(), though it then uses distutils for the rest.<p><a href="https://setuptools.readthedocs.io/en/latest/userguide/quickstart.html#id12" rel="nofollow">https://setuptools.readthedocs.io/en/latest/userguide/quicks...</a> says:<p>> The landscape of Python packaging is shifting and Setuptools has evolved to only provide backend support, no longer being the de-facto packaging tool in the market. All python package must provide a pyproject.toml and specify the backend (build system) it wants to use.<p>Wait, what?<p>What's a "pyproject.toml"?<p>My current setup.py's "build" step generates 10MB of auto-generated C extension code. Am I supposed to ship that too? Or, where do I put that hook?<p>I have a custom build_ext subclass so I can pass per-file compilation flags to the C compiler. How's that handled? I can't even figure out the new way to specify C extension packages in the setuptools documentation?!<p>And it appears that "build" in this modern era means "build a release package", and nothing like what "setup.py build", so keyword searches are failing me.<p>(For example, "A simple, correct PEP 517 package builder" doesn't actually build C extensions.)<p><a href="https://setuptools.readthedocs.io/en/latest/userguide/quickstart.html" rel="nofollow">https://setuptools.readthedocs.io/en/latest/userguide/quicks...</a> goes on to say:<p>> To learn more about Python packaging in general, navigate to the bottom of this page.<p>but that link doesn't exist!<p>Help?