py-cffi: support Python 3.12+ (#47713)
This commit is contained in:
		@@ -91,7 +91,8 @@ class FluxCore(AutotoolsPackage):
 | 
				
			|||||||
    # `link` dependency on python due to Flux's `pymod` module
 | 
					    # `link` dependency on python due to Flux's `pymod` module
 | 
				
			||||||
    depends_on("python@3.6:", type=("build", "link", "run"))
 | 
					    depends_on("python@3.6:", type=("build", "link", "run"))
 | 
				
			||||||
    # Use of distutils in configure script dropped in v0.55
 | 
					    # 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-cffi@1.1:", type=("build", "run"))
 | 
				
			||||||
    depends_on("py-pyyaml@3.10:", 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")
 | 
					    depends_on("py-jsonschema@2.3:", type=("build", "run"), when="@:0.58.0")
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,29 +22,38 @@ class PyCffi(PythonPackage):
 | 
				
			|||||||
    version("1.15.0", sha256="920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954")
 | 
					    version("1.15.0", sha256="920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954")
 | 
				
			||||||
    version("1.14.6", sha256="c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd")
 | 
					    version("1.14.6", sha256="c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd")
 | 
				
			||||||
    version("1.14.3", sha256="f92f789e4f9241cd262ad7a555ca2c648a98178a953af117ef7fad46aa1d5591")
 | 
					    version("1.14.3", sha256="f92f789e4f9241cd262ad7a555ca2c648a98178a953af117ef7fad46aa1d5591")
 | 
				
			||||||
    version("1.13.0", sha256="8fe230f612c18af1df6f348d02d682fe2c28ca0a6c3856c99599cdacae7cf226")
 | 
					    with default_args(deprecated=True):
 | 
				
			||||||
    version("1.12.2", sha256="e113878a446c6228669144ae8a56e268c91b7f1fafae927adc4879d9849e0ea7")
 | 
					        version(
 | 
				
			||||||
    version("1.11.5", sha256="e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4")
 | 
					            "1.13.0", sha256="8fe230f612c18af1df6f348d02d682fe2c28ca0a6c3856c99599cdacae7cf226"
 | 
				
			||||||
    version("1.10.0", sha256="b3b02911eb1f6ada203b0763ba924234629b51586f72a21faacc638269f4ced5")
 | 
					        )
 | 
				
			||||||
    version("1.1.2", sha256="390970b602708c91ddc73953bb6929e56291c18a4d80f360afa00fad8b6f3339")
 | 
					        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
 | 
					    # Based on PyPI wheel availability
 | 
				
			||||||
    # setuptools before distutils, but only on Windows. This could be made
 | 
					    with default_args(type=("build", "link", "run")):
 | 
				
			||||||
    # unconditional to support Python 3.12
 | 
					        depends_on("python@3.8:", when="@1.16:")
 | 
				
			||||||
    depends_on("python@:3.11", type=("build", "run"))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # python 3.12 support was released in @1.16:, however the removal
 | 
					        depends_on("python@:3.13")
 | 
				
			||||||
    # in python3.12 of distutils has resulted in an imperfect fix for prefix-based
 | 
					        depends_on("python@:3.12", when="@:1.16")
 | 
				
			||||||
    # tools like spack, see:
 | 
					        depends_on("python@:3.11", when="@:1.15")
 | 
				
			||||||
    # https://github.com/spack/spack/pull/46224
 | 
					        depends_on("python@:3.10", when="@:1.15.0")
 | 
				
			||||||
    # https://github.com/cython/cython/pull/5754#issuecomment-1752102480
 | 
					        depends_on("python@:3.9", when="@:1.14")
 | 
				
			||||||
    # until this is correctly fixed, do not enable 3.12 support
 | 
					        depends_on("python@:3.8", when="@:1.14.2")
 | 
				
			||||||
    # depends_on("python@:3.12", type=("build", "run"), when="@1.16:")
 | 
					        depends_on("python@:3.7", when="@:1.12")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    depends_on("pkgconfig", type="build")
 | 
					    depends_on("pkgconfig", type="build")
 | 
				
			||||||
    depends_on("py-setuptools", 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-setuptools@66.1:", type="build", when="@1.16:")
 | 
				
			||||||
    depends_on("py-pycparser", type=("build", "run"))
 | 
					    depends_on("py-pycparser", type=("build", "run"))
 | 
				
			||||||
    depends_on("libffi")
 | 
					    depends_on("libffi")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user