-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making setuptools the reference implementation of the distutils API #127
Comments
This was prompted in part by https://bugs.python.org/issue33069, where the fact distutils is still mostly metadata 1.1 focused means it doesn't set the maintainer fields in the metadata (since they were new in metadata 1.2). |
Overall, this proposal sounds good to me and is the right direction.
Why not This effort might run into subtle conflicts with the effort in pypa/setuptools#863, to make pkg_resources an independent package... or maybe not. Based on the outcome of pypa/setuptools#581, setuptools must vendor its dependencies, so pkg_resources will just be one of those vendored dependencies, but that will change:
Instead to require those packages to depend on pkg_resources. It sounds like a good plan. Perhaps we can even secure some sponsorship to hire assistance with the implementation. |
I'm still digesting this idea, however to play a bit of a devil's advocate here, is As we move into a post PEP 518 world we are eliminating the bootstrapping problem for tools like setuptools, where people no longer need to manually ensure that they are installed prior to attempting to install anything that uses them. Thus the eventual goal it seems to me should be that nothing needs to be preinstalled except for a package manager that understands and supports PEP 518. Right now that tool is pip, but it could be something else a decade from now. |
I agree. It's worth serious consideration introducing yet another The issue I've encountered is one of bootstrapping. Thinking about a system where one wishes to build an environment from source without going to the network. One needs a mechanism to make those PEP 518 dependencies available. If one of those is setuptools, how does one make setuptools available, especially when setuptools depends on packaging (among others), which in turn depends on setuptools to build? Can pip (or another build tool), using the metadata and source tarballs of setuptools and its dependencies, build setuptools? It's not sufficient that pip can install from wheels, because these packaging tools (like Spack) wish for compliance and principles of open source, to always build from source. The Moreover, an important goal we have is that no build tool should be elevated. I'd like to create a packaging environment where setuptools isn't a specially-blessed package, but could be theoretically (if not in practice) superseded by another build tool. Baking In light of these considerations, I think I'm now -1 on the proposal for another |
I agree with @dstufft - under PEP 518, we don't need any distutils implementation in the standard library, except as a support library used by setuptools. IMO, this fits in with the spirit of PEP 517 and 518, making setuptools just another contender in the build system ecosystem, with no special privilege, This would still mean that setuptools would need to extend its documentation to include the core distutils API. There would remain the question of what to do with the core distutils code. Doing nothing basically leaves things unchanged, so that's not much help. If pypa/setuptools#417 were implemented, core distutils could simply be dropped (although other tools may use it - I don't think flit does, but I didn't check thoroughly). Alternatively, as it's perfectly OK under PEP 518 for build tools to have dependencies, we could simply make distutils a 3rd party library and have setuptools (and any other build tools that use distutils functionality) depend on it. People wouldn't be able to mistakenly write projects that used raw distutils to build, as distutils itself has no wheel building support (so it doesn't conform to PEP 517/518). |
Given that distutils has been part of the standard library for a couple of decades, I do think we need a straightforward way for folks to say "Make this Python installation provide the distutils API", and it's highly desirable for that mechanism to work without internet access at install time. The bundling could potentially be phased out (and I agree that "no pre-installed build tool" is a desirable longer term goal), but I'd want there to be at least one transitional release that omitted the distutils source tree, but included a setuptools wheel file for easy installation. (I also genuinely doubt we could get a PEP accepted if we omitted such a transitional release) It wouldn't necessarily need to be its own bootstrapping module though - that's just the first approach that occurred to me. Another possibility might be to add a |
I was thinking in terms of a transitional release that issued a warning if users imported distutils. That warning could point users to the docs on setting up a I'm not actively against a means of making the distutils API be "on request", I'm just not sure it's needed. Normal deprecation cycles, combined with the fact that pip 10+ (which will be bundled in Python 3.8, even if it's too late for 3.7) will work without distutils being present, seem sufficient to me. By the way, with pip 10 being released soon (approx 4 weeks from now, if things go to plan), what's the process for discussing what ends up in Python 3.7? Are we too late for 3.7? Should I raise an issue on bpo? Is the process for updating the bundled pip documented anywherem (I couldn't see anything in the devguide)? So many questions... |
Raise an issue for upgrading 3.7 to pip 10 before 3.7.0b4 (due April 20th) on bpo - while we're willing to upgrade |
Back on the topic of a migration strategy, I agree a plain |
Possibly too detailed a question at this point, but would the actual implementation of this be to just import all the code from the existing One possibility might be to cut a bugfix-only LTS version of |
I don’t know if we can honestly talk about such a thing as a «distutils API» that would exist separate from the distutils implementation. It seems to me that having distutils very stable and setuptools patching and extending it has worked acceptably in recent years, and I have an uneasy feeling about engineering a system to remove and install it. (Not commenting on setuptools deciding to copy distutils instead of importing it, which sounds like a good idea, only on the removal + ensuredistutils proposal.) ensurepip is a technical necessity that enables the success story of «Python comes with pip», and it's not so hard to explain it to people. I see less value in removing distutils (and breaking existing code and docs) now that it’s becoming less and less prominent thanks to newer packaging tutorials, PEP 518, flit, cookiecutter, etc. I would like to see in what ways PEP 518 moves the ecosystem and best practices in the upcoming years, and then I think it would make sense to make plans for the evolution of setuptools and eventual removal of distutils. |
@merwok Right now, there are a lot of setup.py's out there that still do By the way, has anyone done an audit of pip 10 to check that it's ready to replace direct setup.py calls in most cases? Does it actually have replacements for |
@njsmith You're right that's probably a separate issue, but I don't think it's ever going to be a goal for pip to replace every possible invocation of So I don't think we're looking to tell people to stop calling |
Regarding the question of "Why not leave the distutils code around indefinitely?", my main concern is with cases like https://bugs.python.org/issue33069, where we have to choose between leaving a subtle misbehaviour in distutils, or else upgrading it to newer metadata versions (duplicating work that has already been done elsewhere, either in distribute and then merged back in to setuptools, or directly in setuptools post-merger). As things stand, building a package with plain distutils can appear to work in simple cases, but you'll be missing quite a few capabilities, and have a debugging session ahead of you to figure out you need the setuptools enhancements. That all gets a lot simpler to understand if "import distutils" starts reporting a DeprecationWarning (and perhaps eventually ImportError) in the absence of the setuptools enhancements. |
Distutils could just stop overwriting author metadata with maintainer metadata. You’d then get the warning it doesn’t understand that keyword when you tried to use it. Folks are more likely to reach for setuptools for things distutils doesn’t support rather than for things where distutils has weird behavior.
…Sent from my iPhone
On Mar 19, 2018, at 6:07 PM, Nick Coghlan ***@***.***> wrote:
Regarding the question of "Why not leave the distutils code around indefinitely?", my main concern is with cases like https://bugs.python.org/issue33069, where we have to choose between leaving a subtle misbehaviour in distutils, or else upgrading it to newer metadata versions (duplicating work that has already been done elsewhere, either in distribute and then merged back in to setuptools, or directly in setuptools post-merger).
As things stand, building a package with plain distutils can appear to work in simple cases, but you'll be missing quite a few capabilities, and have a debugging session ahead of you to figure out you need the setuptools enhancements.
That all gets a lot simpler to understand if "import distutils" starts reporting a DeprecationWarning (and perhaps eventually ImportError) in the absence of the setuptools enhancements.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Regarding the question of migrating maintainers away from invoking |
@doko42 - Can you share the list of Debian packages that currently depend on |
I would not consider usage of distutils.version, .utils (stringtobool), .spawn (find_executable) and distutils.sysconfig really using distutils. These all look like references to old distutils code which should be replaced. Currently remaining dependencies on distutils in Debian (after splitting out distutils from Python3): python3-testtools |
Since this is a backlogged task that we want to finish and that lots of other things depend on, I've added an item for it in the Fundable Packaging Improvements wiki page. |
FYI, pypa/setuptools#2143 has an implementation of step 2. |
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
setuptools 60+ switched to bundled version of distutils (stdlib's one will be removed in the future): pypa/setuptools#2143 pypa/packaging-problems#127 ALT patches stdlib's version of distutils but not the setuptools's one yet. For example, if the system's setuptools replace distutils with its bundled one but the virtualenv's setuptools (bundled wheel) doesn't do it (for example, setuptools < 60), then the behaviour will be inconsistent: ``` [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3.9/site-packages ``` ``` [builder@localhost freeipa-4.9.8]$ export SETUPTOOLS_USE_DISTUTILS=stdlib [builder@localhost freeipa-4.9.8]$ python3 -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_lib(prefix='/usr'))" /usr/lib/python3/site-packages ``` This happens in FreeIPA CI: ``` [1394] /__w/1/s$ /__w/1/s/.tox-install.sh wheel_bundle .tox/pylint3/bin/python /__w/1/s/.tox/pylint3/lib/python3.9/site-packages 'ipaclient[otptoken_yubikey,ldap]' pylint + FLAVOR=wheel_bundle ++ realpath -s .tox/pylint3/bin/python + ENVPYTHON=/__w/1/s/.tox/pylint3/bin/python ++ realpath -s /__w/1/s/.tox/pylint3/lib/python3.9/site-packages + ENVSITEPACKAGESDIR=/__w/1/s/.tox/pylint3/lib/python3.9/site-packages + shift 3 +++ dirname /__w/1/s/.tox-install.sh ++ cd /__w/1/s ++ pwd + TOXINIDIR=/__w/1/s + '[' '!' -x /__w/1/s/.tox/pylint3/bin/python ']' + '[' '!' -d /__w/1/s/.tox/pylint3/lib/python3.9/site-packages ']' + echo '/__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory' /__w/1/s/.tox/pylint3/lib/python3.9/site-packages: no such directory + exit 2 ERROR: invocation failed (exit code 2) ```
For the last few years, we've stopped updating
distutils
to support new packaging interoperability standards, and have instead recommended that folks that want to rely on features in metadata 1.2+, or to generate wheel archives, switch to usingsetuptools
. This has allowed the packaging metadata support to evolve independently of the exact version of Python that folks are using to publish their packages, and it's worked well enough that I'm willing to call the approach a success.However, it has left us with a maintainability issue, which is that we still have a
distutils
API implementation shipping with CPython that we don't actually want people to be using, and the source of the problem isn't always obvious when folks using that implementation aren't getting the behaviour they expect or want.pip
has long injected thesetuptools
monkeypatches ofdistutils
before runningsetup.py
scripts, and thesetuptools
folks are considering switching to providing their ownsetuptools
-maintained copy ofdistutils
rather than continuing to monkeypatch the standard library version at import time: pypa/setuptools#417I think the cleanest way to resolve this will be to actively seek to switch
distutils
over to theensurepip
model of maintenance: add anensuredistutils
module to the standard library that installs bundled versions ofsetuptools
andwheel
, just asensurepip
installs a bundled copy ofpip
.Identified substeps:
setuptools
dependency on stdlibdistutils
)distutils
API in thesetuptools
documentation.ensuredistutils
module targeting either Python 3.9 (feature freeze early 2020) or 3.10 (feature freeze early 2021)pkg_resources
at runtime should be explicitly declaring a dependency onsetuptools
anyway)The text was updated successfully, but these errors were encountered: