Skip to content
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

Merge changes from distutils 2def21c5d74fdd #2987

Merged
merged 21 commits into from
Dec 29, 2021
Merged

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Dec 29, 2021

  • sysconfig: use get_config_h_filename() from the stdlib
  • 👹 Feed the hobgoblins (delint).
  • sysconfig: use parse_config_h() from stdlib sysconfig
  • tests: use loadTestsFromTestCase() instead of the deprecated makeSuite()
  • tests: fix tests on Ubuntu 22.04
  • tests: use sys.executable instead of hardcoding "python"
  • sysconfig: use get_makefile_filename() from stdlib sysconfig
  • Use line-based matrix values for nicer diffs. Remove Python 3.6 and bump to Python 3.10, matching jaraco/skeleton and pypa/setuptools approaches.
  • Restore 'get_versions' attribute, allowing older mpi4py to monkeypatch it. Fixes [BUG] 60.1.0: Installing mpi4py fails with latest setuptools #2969.
  • Disable setuptools installation. Fixes Tests fail when tox/virtualenv installs setuptools 60+ distutils#99.
  • Also use PEP 517 to build things like pytest-virtualenv.
  • 39 is actually required to get the right packages.
  • Unset VIRTUALENV_NO_SETUPTOOLS for ci_setuptools because pytest-virtualenv can't install without it. Ref Project fails to build under pep517 man-group/pytest-plugins#190
  • It really must be literally 39.

Summary of changes

Closes

Pull Request Checklist

lazka and others added 21 commits December 26, 2021 16:51
distutils.sysconfig provides various functions already present in
the stdlib sysconfig module.

Reusing the stdlib versions has the advantage that it is in control of
the Python distributor/packager and distutils doesn't have to deal with
platform details.

This tries to start the transition using the simple get_config_h_filename()
for starters by forwarding calls to the stdlib in case Python is
considered to be installed.
The only difference is the argument name change
sysconfig: use get_config_h_filename() from the stdlib
See python/cpython#28299

loadTestsFromTestCase() is available since Python 2.7 at least.
I added a test for sysconfig.parse_config_h() in 9d0b8cd
which assumed pyconfig.h always has some macros defined and checked
that the result was non-empty.

On Ubuntu 22.04 the pyconfig.h is just a shim, including various platform specific
configs and not defining anything directly.

This changes the test to not assume anything about the output of parse_config_h() instead.
Don't assume a "python" is in PATH.

Fixes this test when run from an uninstalled Python at least.
Instead of guessing the filename just refer to the stdlib.

This also removes the "_makefile_tmpl" hook added in #16, but

1) It was never implemented by the distro requesting it from what I can see:
   https://github.com/NetBSD/pkgsrc/blob/586097714897b1b4d4a9/devel/py-setuptools/Makefile#L28
2) The stdlib version should return a proper result as it is patched by the distro requesting the change:
   https://github.com/NetBSD/pkgsrc/blob/6efa5763ec447864a7d4/lang/python38/patches/patch-Lib_sysconfig.py

Also adds a small test checking that the file exists on Unix platforms
…ump to Python 3.10, matching jaraco/skeleton and pypa/setuptools approaches.
tests: use sys.executable instead of hardcoding "python"
tests: use loadTestsFromTestCase() instead of the deprecated makeSuite()
sysconfig: use get_makefile_filename() from stdlib sysconfig
@jaraco jaraco merged commit d9273a4 into main Dec 29, 2021
@jaraco jaraco deleted the feature/distutils-8c160a9693 branch December 29, 2021 20:34
matthiasdiener added a commit to illinois-ceesd/emirge that referenced this pull request Feb 7, 2022
This reverts commit cae95cf.

The underlying setuptools bug has been fixed:
pypa/setuptools#2987
matthiasdiener added a commit to illinois-ceesd/mirgecom that referenced this pull request Feb 8, 2022
…ing distutils (#585)"

This reverts commit 6ae2890.

The underlying setuptools bug has been fixed:
pypa/setuptools#2987
matthiasdiener added a commit to illinois-ceesd/mirgecom that referenced this pull request Feb 9, 2022
…ing distutils (#585)" (#604)

This reverts commit 6ae2890.

The underlying setuptools bug has been fixed:
pypa/setuptools#2987
matthiasdiener added a commit to illinois-ceesd/emirge that referenced this pull request Feb 9, 2022
This reverts commit cae95cf.

The underlying setuptools bug has been fixed:
pypa/setuptools#2987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants