-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
numpy.distutils
is deprecated in NumPy 1.23 and issues with setuptools>=65
.
#8355
Labels
AOT
ahead of time compilation issue
bug - build/packaging
Bugs: issue with building or packaging Numba
discussion
An issue requiring discussion
Milestone
Comments
stuartarchibald
added
discussion
An issue requiring discussion
bug - build/packaging
Bugs: issue with building or packaging Numba
AOT
ahead of time compilation issue
labels
Aug 16, 2022
stuartarchibald
added a commit
to stuartarchibald/numba
that referenced
this issue
Aug 16, 2022
As title. setuptools>=65 removes the msvc compilers that distutils/extension building relies on. NumPy 1.23 deprecates `numpy.distutils` and recommends using `setuptools<60`. This patch moves the code base to match these requirements to buy some time to migrate away from `numpy.distutils`/`distutils` in general. For context see numba#8355.
#8356 has now been merged. @stuartarchibald do we leave this open as it still requires a long term fix? |
@stuartarchibald could this be a potential long-term fix: #8366 |
3 tasks
Am going to close this as the issue is quite specific and the general issues surrouding |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
AOT
ahead of time compilation issue
bug - build/packaging
Bugs: issue with building or packaging Numba
discussion
An issue requiring discussion
Introduction:
In trying to get to the root cause of this backtrace: #8352 (comment) some things of note:
setuptools >= 65
has removed themsvc
compiler exports that Numba was using via NumPy (see pin setuptools to 64 for doc builds #8352 (comment))numpy.distutils
module with removal scheduled for Python >= 3.12. To trigger the deprecation notice, using NumPy 1.23, run:distutils
compilation chain being broken. MWR that doesn't involve Numba at all:I think that the impact of the
setuptools
change is thatnumba.distutils
for all NumPy versions will be broken.Numba is impacted by this as follows:
This manifests as an issue in Numba's build as the extension modules creation in
setup.py
has this:numba/setup.py
Lines 136 to 143 in f5af7b6
This manifests as issues in Numba's testing as
numba.tests.support
, which is imported in pretty much every single Numba test case to get the customTestCase
class, has this:numba/numba/tests/support.py
Line 42 in f5af7b6
The
pycc
module importsnumpy.distutils.misc_util
to use the external compilers bound bynumpy.distutil
.numba/numba/pycc/platform.py
Line 6 in f5af7b6
which is imported via:
numba/numba/pycc/cc.py
Line 12 in f5af7b6
via:
numba/numba/pycc/__init__.py
Line 11 in f5af7b6
which leads to any import where Numba imports something from
pycc
to trigger the use ofnumpy.distutils
which then hits the problem mentioned in above.Fixing it:
Suggested short term fix is to require setuptools < 60 as suggested by the NumPy 1.23 deprecation warning.
Suggested long term fix it to move away from
numpy.distutils
.The text was updated successfully, but these errors were encountered: