summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2023-10-06 09:44:09 +0200
committerGitHub <noreply@github.com>2023-10-06 09:44:09 +0200
commit36183eac408539e84323fe5ec514d7ae83e4bca6 (patch)
tree88b22516084dba5db49e1582b78135a646edf343 /lib
parent7254c76b6895d76fb83f9f4e95683ebfa33ecffe (diff)
downloadspack-36183eac408539e84323fe5ec514d7ae83e4bca6.tar.gz
spack-36183eac408539e84323fe5ec514d7ae83e4bca6.tar.bz2
spack-36183eac408539e84323fe5ec514d7ae83e4bca6.tar.xz
spack-36183eac408539e84323fe5ec514d7ae83e4bca6.zip
python: add 3.12.0 (but keep 3.11 preferred) (#40282)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_systems/meson.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/spack/spack/build_systems/meson.py b/lib/spack/spack/build_systems/meson.py
index 1a5e69e081..38939dc7ad 100644
--- a/lib/spack/spack/build_systems/meson.py
+++ b/lib/spack/spack/build_systems/meson.py
@@ -10,7 +10,7 @@ import llnl.util.filesystem as fs
import spack.builder
import spack.package_base
-from spack.directives import build_system, depends_on, variant
+from spack.directives import build_system, conflicts, depends_on, variant
from spack.multimethod import when
from ._checks import BaseBuilder, execute_build_time_tests
@@ -47,6 +47,13 @@ class MesonPackage(spack.package_base.PackageBase):
variant("strip", default=False, description="Strip targets on install")
depends_on("meson", type="build")
depends_on("ninja", type="build")
+ # Python detection in meson requires distutils to be importable, but distutils no longer
+ # exists in Python 3.12. In Spack, we can't use setuptools as distutils replacement,
+ # because the distutils-precedence.pth startup file that setuptools ships with is not run
+ # when setuptools is in PYTHONPATH; it has to be in system site-packages. In a future meson
+ # release, the distutils requirement will be dropped, so this conflict can be relaxed.
+ # We have patches to make it work with meson 1.1 and above.
+ conflicts("^python@3.12:", when="^meson@:1.0")
def flags_to_build_system_args(self, flags):
"""Produces a list of all command line arguments to pass the specified