diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2024-11-24 08:41:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-24 08:41:29 +0100 |
commit | c57452dd08f9f4da6db1f4591053ea496893140a (patch) | |
tree | 95700da1e95569905f256c327610eadaae9184c3 | |
parent | a7e57c9a14ce36d6a3b03d7cd3b3357754b89019 (diff) | |
download | spack-c57452dd08f9f4da6db1f4591053ea496893140a.tar.gz spack-c57452dd08f9f4da6db1f4591053ea496893140a.tar.bz2 spack-c57452dd08f9f4da6db1f4591053ea496893140a.tar.xz spack-c57452dd08f9f4da6db1f4591053ea496893140a.zip |
py-cffi: support Python 3.12+ (#47713)
-rw-r--r-- | var/spack/repos/builtin/packages/flux-core/package.py | 3 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/py-cffi/package.py | 43 |
2 files changed, 28 insertions, 18 deletions
diff --git a/var/spack/repos/builtin/packages/flux-core/package.py b/var/spack/repos/builtin/packages/flux-core/package.py index 71d2109789..0e26992537 100644 --- a/var/spack/repos/builtin/packages/flux-core/package.py +++ b/var/spack/repos/builtin/packages/flux-core/package.py @@ -91,7 +91,8 @@ class FluxCore(AutotoolsPackage): # `link` dependency on python due to Flux's `pymod` module depends_on("python@3.6:", type=("build", "link", "run")) # Use of distutils in configure script dropped in v0.55 - depends_on("python@:3.11", when="@:0.54", type=("build", "link", "run")) + # Detection of cffi version fixed in v0.68 + depends_on("python@:3.11", when="@:0.67", type=("build", "link", "run")) depends_on("py-cffi@1.1:", type=("build", "run")) depends_on("py-pyyaml@3.10:", type=("build", "run")) depends_on("py-jsonschema@2.3:", type=("build", "run"), when="@:0.58.0") diff --git a/var/spack/repos/builtin/packages/py-cffi/package.py b/var/spack/repos/builtin/packages/py-cffi/package.py index 6f312fd942..c32e5ccd7c 100644 --- a/var/spack/repos/builtin/packages/py-cffi/package.py +++ b/var/spack/repos/builtin/packages/py-cffi/package.py @@ -22,29 +22,38 @@ class PyCffi(PythonPackage): version("1.15.0", sha256="920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954") version("1.14.6", sha256="c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd") version("1.14.3", sha256="f92f789e4f9241cd262ad7a555ca2c648a98178a953af117ef7fad46aa1d5591") - version("1.13.0", sha256="8fe230f612c18af1df6f348d02d682fe2c28ca0a6c3856c99599cdacae7cf226") - version("1.12.2", sha256="e113878a446c6228669144ae8a56e268c91b7f1fafae927adc4879d9849e0ea7") - version("1.11.5", sha256="e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4") - version("1.10.0", sha256="b3b02911eb1f6ada203b0763ba924234629b51586f72a21faacc638269f4ced5") - version("1.1.2", sha256="390970b602708c91ddc73953bb6929e56291c18a4d80f360afa00fad8b6f3339") + with default_args(deprecated=True): + version( + "1.13.0", sha256="8fe230f612c18af1df6f348d02d682fe2c28ca0a6c3856c99599cdacae7cf226" + ) + version( + "1.12.2", sha256="e113878a446c6228669144ae8a56e268c91b7f1fafae927adc4879d9849e0ea7" + ) + version( + "1.11.5", sha256="e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4" + ) + version( + "1.10.0", sha256="b3b02911eb1f6ada203b0763ba924234629b51586f72a21faacc638269f4ced5" + ) + version("1.1.2", sha256="390970b602708c91ddc73953bb6929e56291c18a4d80f360afa00fad8b6f3339") - depends_on("c", type="build") # generated + depends_on("c", type="build") - # ./spack-src/cffi/ffiplatform.py has _hack_at_distutils which imports - # setuptools before distutils, but only on Windows. This could be made - # unconditional to support Python 3.12 - depends_on("python@:3.11", type=("build", "run")) + # Based on PyPI wheel availability + with default_args(type=("build", "link", "run")): + depends_on("python@3.8:", when="@1.16:") - # python 3.12 support was released in @1.16:, however the removal - # in python3.12 of distutils has resulted in an imperfect fix for prefix-based - # tools like spack, see: - # https://github.com/spack/spack/pull/46224 - # https://github.com/cython/cython/pull/5754#issuecomment-1752102480 - # until this is correctly fixed, do not enable 3.12 support - # depends_on("python@:3.12", type=("build", "run"), when="@1.16:") + depends_on("python@:3.13") + depends_on("python@:3.12", when="@:1.16") + depends_on("python@:3.11", when="@:1.15") + depends_on("python@:3.10", when="@:1.15.0") + depends_on("python@:3.9", when="@:1.14") + depends_on("python@:3.8", when="@:1.14.2") + depends_on("python@:3.7", when="@:1.12") depends_on("pkgconfig", type="build") depends_on("py-setuptools", type="build") + depends_on("py-setuptools", type="run", when="^python@3.12:") depends_on("py-setuptools@66.1:", type="build", when="@1.16:") depends_on("py-pycparser", type=("build", "run")) depends_on("libffi") |