So since PEP 517 is going into setuptools anyway, we can sys.path.insert(0, NEW_DISTUTILS_LOCATION) and then import distutils in the interface before setup.py is loaded. Seems simple enough.
2017-09-27 11:27 GMT-05:00 Nick Coghlan <ncogh...@gmail.com>: > On 27 September 2017 at 23:35, Donald Stufft <don...@stufft.io> wrote: > > I suspect this might be difficult, but I haven’t actually tried it. Our > > trick (and really setup tools itself relies on this too) is that > setuptools > > monkey patches distutils at runtime to make distutils into setuptools. It > > only has to patch a few bits and pieces right now, but I suspect that if > > this happened it’d have to monkey patch the entire namespace. It would > > probably also break people who mix and match imports from setuptools and > > distutils. > > Right, my assumption was that pip would need to ensure that setuptools > took over the distutils namespace before any of the code in setup.py > ran, so that any monkeypatches and state modifications in other code > would all take place in the setuptools provided copy, and the standard > library's copy would never even get loaded. > > However, I don't think that's a new requirement: I believe you already > need to do that, since the first line might be "from distutils import > setup". > > Cheers, > Nick. > > -- > Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia >
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig