mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-10 14:18:16 -07:00
Now with py3.12 support thanks to a patch which uses the canonical NumPy way of getting the location of its header files instead of messing with imp.find_module(). Upstream said in the relevant file they did it that way because importing numpy "screws up distutils", however either this is no longer the case with the current versions of everything involved or PEP-517 installation is not affected. Signed-off-by: Marek Szuba <marecki@gentoo.org>
17 lines
409 B
Diff
17 lines
409 B
Diff
--- a/aksetup_helper.py
|
|
+++ b/aksetup_helper.py
|
|
@@ -43,11 +43,8 @@
|
|
|
|
|
|
def get_numpy_incpath():
|
|
- from imp import find_module
|
|
- # avoid actually importing numpy, it screws up distutils
|
|
- file, pathname, descr = find_module("numpy")
|
|
- from os.path import join
|
|
- return join(pathname, "core", "include")
|
|
+ import numpy as np
|
|
+ return np.get_include()
|
|
|
|
|
|
class NumpyExtension(Extension):
|