forked from macports/macports-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
py-scipy: update to 1.11.4 and add py312 subport
Update py-scipy to 1.11.4 and add py312 subport. Add py312 subport and Python 3.12 compatibility patch to its dependency py-pythran.
- Loading branch information
Showing
5 changed files
with
136 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
--- pythran/config.py | ||
+++ pythran/config.py | ||
@@ -246,26 +246,20 @@ def make_extension(python, **extra): | ||
extension['define_macros'].append('PYTHRAN_BLAS_NONE') | ||
|
||
if user_blas not in reserved_blas_entries: | ||
- if sys.version_info < (3, 12): | ||
- # `numpy.distutils` not present for Python >= 3.12 | ||
- try: | ||
- import numpy.distutils.system_info as numpy_sys | ||
- # Numpy can pollute stdout with checks | ||
- with silent(): | ||
- numpy_blas = numpy_sys.get_info(user_blas) | ||
- # required to cope with atlas missing extern "C" | ||
- extension['define_macros'].append('PYTHRAN_BLAS_{}' | ||
- .format(user_blas.upper())) | ||
- extension['libraries'].extend(numpy_blas.get('libraries', [])) | ||
- extension['library_dirs'].extend( | ||
- numpy_blas.get('library_dirs', [])) | ||
- extension['include_dirs'].extend( | ||
- numpy_blas.get('include_dirs', [])) | ||
- except Exception as exc: | ||
- raise RuntimeError( | ||
- "The likely cause of this failure is an incompatibility " | ||
- "between `setuptools` and `numpy.distutils. " | ||
- ) from exc | ||
+ try: | ||
+ import numpy.distutils.system_info as numpy_sys | ||
+ # Numpy can pollute stdout with checks | ||
+ with silent(): | ||
+ numpy_blas = numpy_sys.get_info(user_blas) | ||
+ extension['libraries'].extend(numpy_blas.get('libraries', [])) | ||
+ extension['library_dirs'].extend( | ||
+ numpy_blas.get('library_dirs', [])) | ||
+ # `numpy.distutils` not present for Python >= 3.12 | ||
+ except ImportError: | ||
+ blas = numpy.show_config('dicts')["Build Dependencies"]["blas"] | ||
+ libblas = {'openblas64': 'openblas'}.get(blas['name'], blas['name']) | ||
+ extension["libraries"].append(libblas) | ||
+ | ||
|
||
# final macro normalization | ||
extension["define_macros"] = [ | ||
--- pythran/dist.py | ||
+++ pythran/dist.py | ||
@@ -13,14 +13,17 @@ except ImportError: | ||
import os.path | ||
import os | ||
|
||
-from distutils.command.build_ext import build_ext as LegacyBuildExt | ||
+try: | ||
+ from distutils.command.build_ext import build_ext as LegacyBuildExt | ||
+except ImportError: | ||
+ from setuptools.command.build_ext import build_ext as LegacyBuildExt | ||
|
||
try: | ||
# `numpy.distutils` is deprecated, and won't be present on Python >=3.12 | ||
# If it is installed, we need to use it though, so try-import it: | ||
from numpy.distutils.extension import Extension | ||
except ImportError: | ||
- from distutils.extension import Extension | ||
+ from setuptools.extension import Extension | ||
|
||
|
||
|
||
--- requirements.txt | ||
+++ requirements.txt | ||
@@ -1,4 +1,5 @@ | ||
ply>=3.4 | ||
+setuptools | ||
gast~=0.5.0 | ||
numpy | ||
beniget~=0.4.0 | ||
--- pythran/toolchain.py | ||
+++ pythran/toolchain.py | ||
@@ -22,13 +22,17 @@ from pythran.version import __version__ | ||
from pythran.utils import cxxid | ||
import pythran.frontend as frontend | ||
|
||
-from distutils.errors import CompileError | ||
-from distutils import sysconfig | ||
+try: | ||
+ from distutils.errors import CompileError | ||
+ from distutils import sysconfig | ||
+except ImportError: | ||
+ from setuptools.errors import CompileError | ||
+ from setuptools._distutils import sysconfig | ||
try: | ||
# `numpy.distutils is deprecated, may not be present, or broken | ||
from numpy.distutils.core import setup | ||
except Exception: | ||
- from distutils.core import setup | ||
+ from setuptools import setup | ||
|
||
from tempfile import mkdtemp, NamedTemporaryFile | ||
import gast as ast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- pyproject.toml | ||
+++ pyproject.toml | ||
@@ -11,11 +11,11 @@ | ||
build-backend = 'mesonpy' | ||
requires = [ | ||
# Reason for `<`: future-proofing (0.14.0 released and known to work) | ||
- "meson-python>=0.12.1,<0.15.0", | ||
+ "meson-python>=0.12.1", | ||
# Reason for `<`: we want to build the 1.11.x releases with 0.29.x (too many changes in 3.0) | ||
"Cython>=0.29.35,<3.0", # when updating version, also update check in meson.build | ||
# Reason for `<`: future-proofing (2.11.1 is the most recent version) | ||
- "pybind11>=2.10.4,<2.11.1", | ||
+ "pybind11>=2.10.4", | ||
# Reason for `<`: future-proofing (0.14.0 released and known to work) | ||
"pythran>=0.12.0,<0.15.0", |