From c8d8f65fe9376cf9478606199a64f148e0db0647 Mon Sep 17 00:00:00 2001 From: Malcolm Smith Date: Tue, 22 Oct 2024 11:19:30 +0000 Subject: [PATCH] Working on Python 3.13: bcrypt lru-dict numpy pandas --- server/pypi/compiler-wrapper.py | 5 +++- server/pypi/packages/astropy/meta.yaml | 2 +- server/pypi/packages/aubio/meta.yaml | 2 +- server/pypi/packages/jpegio/meta.yaml | 2 +- server/pypi/packages/matplotlib/meta.yaml | 2 +- server/pypi/packages/pandas/meta.yaml | 4 +-- .../packages/pandas/patches/chaquopy.patch | 27 ++++++++++++++----- server/pypi/packages/photutils/meta.yaml | 2 +- server/pypi/packages/pyerfa/meta.yaml | 2 +- server/pypi/packages/scikit-image/meta.yaml | 2 +- target/README.md | 2 +- 11 files changed, 34 insertions(+), 18 deletions(-) diff --git a/server/pypi/compiler-wrapper.py b/server/pypi/compiler-wrapper.py index a3120a0cc2..ed302490b4 100755 --- a/server/pypi/compiler-wrapper.py +++ b/server/pypi/compiler-wrapper.py @@ -50,7 +50,10 @@ def extend_if(valid, args): i += 1 if args_removed: - print("Chaquopy: removed arguments: " + shlex.join(args_removed)) + print( + "Chaquopy: removed arguments: " + shlex.join(args_removed), + file=sys.stderr) # Some build systems hide the compiler's stdout. + os.execv(args_out[0], args_out) diff --git a/server/pypi/packages/astropy/meta.yaml b/server/pypi/packages/astropy/meta.yaml index e75543e8ee..1a4acebf36 100644 --- a/server/pypi/packages/astropy/meta.yaml +++ b/server/pypi/packages/astropy/meta.yaml @@ -2,7 +2,7 @@ {% set numpy_version = "1.19.5" %} {% elif PY_VER in ["3.9", "3.10", "3.11"] %} {% set numpy_version = "1.23.3" %} -{% elif PY_VER == "3.12" %} +{% elif PY_VER in ["3.12", "3.13"] %} {% set numpy_version = "1.26.2" %} {% endif %} diff --git a/server/pypi/packages/aubio/meta.yaml b/server/pypi/packages/aubio/meta.yaml index e8056fa769..9c3f61f971 100644 --- a/server/pypi/packages/aubio/meta.yaml +++ b/server/pypi/packages/aubio/meta.yaml @@ -2,7 +2,7 @@ {% set numpy_version = "1.19.5" %} {% elif PY_VER in ["3.9", "3.10", "3.11"] %} {% set numpy_version = "1.23.3" %} -{% elif PY_VER == "3.12" %} +{% elif PY_VER in ["3.12", "3.13"] %} {% set numpy_version = "1.26.2" %} {% endif %} diff --git a/server/pypi/packages/jpegio/meta.yaml b/server/pypi/packages/jpegio/meta.yaml index c51c485906..c92ee3c0b6 100644 --- a/server/pypi/packages/jpegio/meta.yaml +++ b/server/pypi/packages/jpegio/meta.yaml @@ -2,7 +2,7 @@ {% set numpy_version = "1.19.5" %} {% elif PY_VER in ["3.9", "3.10", "3.11"] %} {% set numpy_version = "1.23.3" %} -{% elif PY_VER == "3.12" %} +{% elif PY_VER in ["3.12", "3.13"] %} {% set numpy_version = "1.26.2" %} {% endif %} diff --git a/server/pypi/packages/matplotlib/meta.yaml b/server/pypi/packages/matplotlib/meta.yaml index 4448303ab4..ddc78b211b 100644 --- a/server/pypi/packages/matplotlib/meta.yaml +++ b/server/pypi/packages/matplotlib/meta.yaml @@ -2,7 +2,7 @@ {% set numpy_version = "1.19.5" %} {% elif PY_VER in ["3.9", "3.10", "3.11"] %} {% set numpy_version = "1.23.3" %} -{% elif PY_VER == "3.12" %} +{% elif PY_VER in ["3.12", "3.13"] %} {% set numpy_version = "1.26.2" %} {% endif %} diff --git a/server/pypi/packages/pandas/meta.yaml b/server/pypi/packages/pandas/meta.yaml index da52856f69..7a7d558daa 100644 --- a/server/pypi/packages/pandas/meta.yaml +++ b/server/pypi/packages/pandas/meta.yaml @@ -2,7 +2,7 @@ {% set numpy_version = "1.19.5" %} {% elif PY_VER in ["3.9", "3.10", "3.11"] %} {% set numpy_version = "1.23.3" %} -{% elif PY_VER == "3.12" %} +{% elif PY_VER in ["3.12", "3.13"] %} {% set numpy_version = "1.26.2" %} {% endif %} @@ -19,7 +19,7 @@ source: git_rev: v{{ version }} build: - number: 0 + number: 1 requirements: host: diff --git a/server/pypi/packages/pandas/patches/chaquopy.patch b/server/pypi/packages/pandas/patches/chaquopy.patch index 529c9dce67..287970a4b9 100644 --- a/server/pypi/packages/pandas/patches/chaquopy.patch +++ b/server/pypi/packages/pandas/patches/chaquopy.patch @@ -11,21 +11,34 @@ import numpy from pkg_resources import parse_version from setuptools import ( ---- src-original/pyproject.toml 2023-12-06 12:10:08.000000000 +0000 -+++ src/pyproject.toml 2023-12-06 12:33:14.841679887 +0000 -@@ -2,8 +2,9 @@ +--- aaa/pyproject.toml 2024-10-21 14:07:02.000000000 +0000 ++++ src/pyproject.toml 2024-10-22 10:54:36.432787684 +0000 +@@ -2,19 +2,28 @@ # Minimum requirements for the build system to execute. # See https://github.com/scipy/scipy/pull/12940 for the AIX issue. requires = [ - "meson-python==0.13.1", - "meson==1.2.1", -+ # Chaquopy: disabled meson, since the setuptools build still works for now ++ # Chaquopy: replaced meson with setuptools, which still works for now. ++ # "meson-python==0.13.1", ++ # "meson==1.2.1", + "setuptools==69.0.2", + "wheel", - "Cython>=0.29.33,<3", # Note: sync with setup.py, environment.yml and asv.conf.json +- "Cython>=0.29.33,<3", # Note: sync with setup.py, environment.yml and asv.conf.json ++ ++ # Chaquopy: increased Cython upper limit from 3 to 3.1, for Python 3.13 support. ++ "Cython>=0.29.33,<3.1", # Note: sync with setup.py, environment.yml and asv.conf.json ++ # Note: numpy 1.25 has a backwards compatible C API by default -@@ -14,7 +15,8 @@ + # we don't want to force users to compile with 1.25 though + # (Ideally, in the future, though, oldest-supported-numpy can be dropped when our min numpy is 1.25.x) +- "oldest-supported-numpy>=2022.8.16; python_version<'3.12'", +- "numpy>=1.26.0,<2; python_version>='3.12'", ++ # Chaquopy: disabled numpy, since it's already listed in meta.yaml. ++ # "oldest-supported-numpy>=2022.8.16; python_version<'3.12'", ++ # "numpy>=1.26.0,<2; python_version>='3.12'", ++ "versioneer[toml]" ] @@ -35,7 +48,7 @@ [project] name = 'pandas' -@@ -137,7 +139,12 @@ +@@ -137,7 +146,12 @@ # resulting files. [tool.versioneer] VCS = "git" diff --git a/server/pypi/packages/photutils/meta.yaml b/server/pypi/packages/photutils/meta.yaml index 1161ea4a2a..f513eaa47f 100644 --- a/server/pypi/packages/photutils/meta.yaml +++ b/server/pypi/packages/photutils/meta.yaml @@ -2,7 +2,7 @@ {% set numpy_version = "1.19.5" %} {% elif PY_VER in ["3.9", "3.10", "3.11"] %} {% set numpy_version = "1.23.3" %} -{% elif PY_VER == "3.12" %} +{% elif PY_VER in ["3.12", "3.13"] %} {% set numpy_version = "1.26.2" %} {% endif %} diff --git a/server/pypi/packages/pyerfa/meta.yaml b/server/pypi/packages/pyerfa/meta.yaml index d2758d92cc..b747eea3f4 100644 --- a/server/pypi/packages/pyerfa/meta.yaml +++ b/server/pypi/packages/pyerfa/meta.yaml @@ -2,7 +2,7 @@ {% set numpy_version = "1.19.5" %} {% elif PY_VER in ["3.9", "3.10", "3.11"] %} {% set numpy_version = "1.23.3" %} -{% elif PY_VER == "3.12" %} +{% elif PY_VER in ["3.12", "3.13"] %} {% set numpy_version = "1.26.2" %} {% endif %} diff --git a/server/pypi/packages/scikit-image/meta.yaml b/server/pypi/packages/scikit-image/meta.yaml index 50459de2e8..4d19c5a71b 100644 --- a/server/pypi/packages/scikit-image/meta.yaml +++ b/server/pypi/packages/scikit-image/meta.yaml @@ -2,7 +2,7 @@ {% set numpy_version = "1.17.4" %} {% elif PY_VER in ["3.9", "3.10", "3.11"] %} {% set numpy_version = "1.23.3" %} -{% elif PY_VER == "3.12" %} +{% elif PY_VER in ["3.12", "3.13"] %} {% set numpy_version = "1.26.2" %} {% endif %} diff --git a/target/README.md b/target/README.md index 21ef603a7f..1df3846d6d 100644 --- a/target/README.md +++ b/target/README.md @@ -43,7 +43,7 @@ When building wheels for other packages: * Try to build all the packages we currently have in the repository for the previous Python version. * For each package, in dependency order: - * Check whether there are any existing notes in issues or PRs. + * Check for notes in the meta.yaml file, in issues or in PRs. * Update to the current stable version, unless this would take a lot of work which isn't justified by user demand. * Review patches and build scripts to see if there are any workarounds which are no