Skip to content

MAINT: be more tolerant of setuptools >= 60#20985

Merged
charris merged 1 commit intonumpy:maintenance/1.22.xfrom
charris:backport-20963
Feb 3, 2022
Merged

MAINT: be more tolerant of setuptools >= 60#20985
charris merged 1 commit intonumpy:maintenance/1.22.xfrom
charris:backport-20963

Conversation

@charris
Copy link
Member

@charris charris commented Feb 2, 2022

Backport of #20963.

NumPy may fail to build with the default vendored distutils in setuptools>=60. Rather than panic and die when new setuptools is found, let's check (or set, if possible) the SETUPTOOLS_USE_DISTUTILS environment variable that restores "proper" setuptools behavior.

We were bitten by #20759 and #20795 in Void Linux, which has already moved to setuptools>60.

Note that I cannot reproduce a build failure (at least not on maintenance/v.1.22.x) even when the new default isn't overridden. (That is, reverting https://github.com/numpy/numpy/pull/20759/https://github.com/numpy/numpy/pull/20795[](https://github.com/ahesford) is sufficient to allow NumPy to build for me.) However, in certain cases where it the new default might cause problems, this change should thread the needle. Sticking with setuptools < 60 for the next year while NumPy moves to a new build system is simply not a good option for Linux packagers.

NumPy may fail to build with the default vendored distutils in
setuptools>=60. Rather than panic and die when new setuptools is found,
let's check (or set, if possible) the SETUPTOOLS_USE_DISTUTILS
environment variable that restores "proper" setuptools behavior.
@charris charris added 03 - Maintenance 08 - Backport Used to tag backport PRs labels Feb 2, 2022
@charris charris added this to the 1.22.2 release milestone Feb 2, 2022
@charris charris merged commit 0045308 into numpy:maintenance/1.22.x Feb 3, 2022
@charris charris deleted the backport-20963 branch April 10, 2022 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

03 - Maintenance 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants