diff --git a/packages/bazel/package.py b/packages/bazel/package.py index 64df14b13074675a697b11db7f52d5d302b08c58..72e562ca62928c2a718db9355fc709fc89b8b1b3 100644 --- a/packages/bazel/package.py +++ b/packages/bazel/package.py @@ -482,13 +482,14 @@ class Bazel(Package): # https://blog.bazel.build/2021/05/21/bazel-4-1.html conflicts("platform=darwin target=aarch64:", when="@:4.0") - # patches for compiling bazel-4.1:4 with gcc-11 + # patches for compiling various older bazels which had ICWYU + # violations revealed by (but not unique to) GCC 11 header changes. # these are derived from # https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29084/ - patch("gcc11_1.patch", when="@0.3.2:4%gcc@11:") - patch("gcc11_2.patch", when="@0.3.2:4%gcc@11:") - patch("gcc11_3.patch", when="@0.3:4%gcc@11:") - patch("gcc11_4.patch", when="@4.1:4%gcc@11:") + patch("gcc11_1.patch", when="@0.3.2:4") + patch("gcc11_2.patch", when="@0.3.2:4") + patch("gcc11_3.patch", when="@0.3:4") + patch("gcc11_4.patch", when="@4.1:4") # bazel-4.0.0 does not compile with gcc-11 # newer versions of grpc and abseil dependencies are needed but are not in @@ -526,13 +527,6 @@ class Bazel(Package): "--color=no --host_javabase=@local_jdk//:jdk" # Enable verbose output for failures " --verbose_failures" - # Ask bazel to explain what it's up to - # Needs a filename as argument - " --explain=explainlogfile.txt" - # Increase verbosity of explanation, - " --verbose_explanations" - # Show (formatted) subcommands being executed - " --subcommands=pretty_print" # expose LD_LIBRARY_PATH (to fix protoc runtime error during build) " --action_env=LD_LIBRARY_PATH" " --jobs={0}".format(make_jobs), diff --git a/packages/gcc/detection_test.yaml b/packages/gcc/detection_test.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5e53101a699d77c314c0c07e939c9195a09f6d04 --- /dev/null +++ b/packages/gcc/detection_test.yaml @@ -0,0 +1,38 @@ +paths: + # Ubuntu 18.04, system compilers without Fortran + - layout: + - executables: + - "bin/gcc" + - "bin/g++" + script: "echo 7.5.0" + results: + - spec: "gcc@7.5.0 languages=c,c++" + # Mock a version < 7 of GCC that requires -dumpversion and + # errors with -dumpfullversion + - layout: + - executables: + - "bin/gcc-5" + - "bin/g++-5" + - "bin/gfortran-5" + script: | + if [[ "$1" == "-dumpversion" ]] ; then + echo "5.5.0" + else + echo "gcc-5: fatal error: no input files" + echo "compilation terminated." + exit 1 + fi + results: + - spec: "gcc@5.5.0 languages=c,c++,fortran" + # Multiple compilers present at the same time + - layout: + - executables: + - "bin/x86_64-linux-gnu-gcc-6" + script: 'echo 6.5.0' + - executables: + - "bin/x86_64-linux-gnu-gcc-10" + - "bin/x86_64-linux-gnu-g++-10" + script: "echo 10.1.0" + results: + - spec: "gcc@6.5.0 languages=c" + - spec: "gcc@10.1.0 languages=c,c++" \ No newline at end of file diff --git a/packages/gcc/package.py b/packages/gcc/package.py index f572a133bd47a412aebcc627bb3e422385c95f5f..a8d36dc14145be0c21304b5b192e920a6219d713 100644 --- a/packages/gcc/package.py +++ b/packages/gcc/package.py @@ -35,16 +35,19 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): version("master", branch="master") + version("13.2.0", sha256="e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da") version("13.1.0", sha256="61d684f0aa5e76ac6585ad8898a2427aade8979ed5e7f85492286c4dfc13ee86") version("12.3.0", sha256="949a5d4f99e786421a93b532b22ffab5578de7321369975b91aec97adfda8c3b") version("12.2.0", sha256="e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff") version("12.1.0", sha256="62fd634889f31c02b64af2c468f064b47ad1ca78411c45abe6ac4b5f8dd19c7b") + version("11.4.0", sha256="3f2db222b007e8a4a23cd5ba56726ef08e8b1f1eb2055ee72c1402cea73a8dd9") version("11.3.0", sha256="b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39") version("11.2.0", sha256="d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b") version("11.1.0", sha256="4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf") + version("10.5.0", sha256="25109543fdf46f397c347b5d8b7a2c7e5694a5a51cce4b9c6e1ea8a71ca307c1") version("10.4.0", sha256="c9297d5bcd7cb43f3dfc2fed5389e948c9312fd962ef6a4ce455cff963ebe4f1") version("10.3.0", sha256="64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344") version("10.2.0", sha256="b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c") @@ -179,7 +182,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): depends_on("isl@0.15:0.20", when="@9:9.9") depends_on("isl@0.15:", when="@10:") - depends_on("zlib", when="@6:") + depends_on("zlib-api", when="@6:") depends_on("zstd", when="@10:") depends_on("diffutils", type="build") depends_on("iconv", when="platform=darwin") @@ -334,11 +337,11 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): # on XCode 12.5 conflicts("+bootstrap", when="@:11.1 %apple-clang@12.0.5") - # aarch64/M1 is supported in GCC 11.3-12.2 - conflicts( - "@:11.2,12.3:", + # aarch64/M1 is supported in GCC 11.3-12.2 and 13 + requires( + "@11.3,12.2,13.1:", when="target=aarch64: platform=darwin", - msg="Only GCC 11.3-12.2 support macOS M1 (aarch64)", + msg="Only GCC 11.3-12.2, 13.1+ support macOS M1 (aarch64)", ) # Newer binutils than RHEL's is required to run `as` on some instructions @@ -410,7 +413,17 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): sha256="a7843b5c6bf1401e40c20c72af69c8f6fc9754ae980bb4a5f0540220b3dcb62d", when="@12.2.0 target=aarch64:", ) - conflicts("+bootstrap", when="@11.3.0 target=aarch64:") + patch( + "https://raw.githubusercontent.com/Homebrew/formula-patches/5c206c47/gcc/gcc-13.1.0.diff", + sha256="cb4e8a89387f748a744da0273025d0dc2e3c76780cc390b18ada704676afea11", + when="@13.1.0 target=aarch64:", + ) + patch( + "https://raw.githubusercontent.com/Homebrew/formula-patches/3c5cbc8e9cf444a1967786af48e430588e1eb481/gcc/gcc-13.2.0.diff", + sha256="2df7ef067871a30b2531a2013b3db661ec9e61037341977bfc451e30bf2c1035", + when="@13.2.0 target=aarch64:", + ) + conflicts("+bootstrap", when="@11.3.0,13.1: target=aarch64:") # Use -headerpad_max_install_names in the build, # otherwise updated load commands won't fit in the Mach-O header. @@ -627,7 +640,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): "7.1.0" ): self.gnu_mirror_path = self.gnu_mirror_path.replace("xz", "bz2") - return super(Gcc, self).url_for_version(version) + return super().url_for_version(version) def patch(self): spec = self.spec @@ -649,9 +662,11 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): # Use installed libz if self.version >= Version("6"): - filter_file("@zlibdir@", "-L{0}".format(spec["zlib"].prefix.lib), "gcc/Makefile.in") filter_file( - "@zlibinc@", "-I{0}".format(spec["zlib"].prefix.include), "gcc/Makefile.in" + "@zlibdir@", "-L{0}".format(spec["zlib-api"].prefix.lib), "gcc/Makefile.in" + ) + filter_file( + "@zlibinc@", "-I{0}".format(spec["zlib-api"].prefix.include), "gcc/Makefile.in" ) if spec.satisfies("+nvptx"): @@ -768,6 +783,11 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): "--with-as=" + binutils.join("as"), ] ) + elif spec.satisfies("%apple-clang@15:"): + # https://github.com/iains/gcc-darwin-arm64/issues/117 + # https://github.com/iains/gcc-12-branch/issues/22 + # https://github.com/iains/gcc-13-branch/issues/8 + options.append("--with-ld=/Library/Developer/CommandLineTools/usr/bin/ld-classic") # enable_bootstrap if spec.satisfies("+bootstrap"): @@ -1015,11 +1035,11 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): """ # Detect GCC package in the directory of the GCC compiler # or in the $PATH if self.compiler.cc is not an absolute path: - from spack.detection import by_executable + from spack.detection import by_path compiler_dir = os.path.dirname(self.compiler.cc) - detected_packages = by_executable( - [self.__class__], path_hints=([compiler_dir] if os.path.isdir(compiler_dir) else None) + detected_packages = by_path( + [self.name], path_hints=([compiler_dir] if os.path.isdir(compiler_dir) else None) ) # We consider only packages that satisfy the following constraint: diff --git a/packages/openbabel/package.py b/packages/openbabel/package.py index ea99f8d4fc7f1d0b85f171a8a51a7a4515c4f131..2bf09af891251d33bcc0c3e5ff2408ea04a82c35 100644 --- a/packages/openbabel/package.py +++ b/packages/openbabel/package.py @@ -19,11 +19,11 @@ class Openbabel(CMakePackage): maintainers("RMeli") version("master", branch="master") - version("3.1.1", tag="openbabel-3-1-1") - version("3.1.0", tag="openbabel-3-1-0") - version("3.0.0", tag="openbabel-3-0-0") - version("2.4.1", tag="openbabel-2-4-1") - version("2.4.0", tag="openbabel-2-4-0") + version("3.1.1", tag="openbabel-3-1-1", commit="cbd4db43f8908b874864280fdc03bf92569eebc1") + version("3.1.0", tag="openbabel-3-1-0", commit="1e593abc1edf47352d5e8a0887654edf69a2f5f3") + version("3.0.0", tag="openbabel-3-0-0", commit="49f9cfb32bd0bc6ea440639d338123eb27accbe2") + version("2.4.1", tag="openbabel-2-4-1", commit="701f6049c483b1349118c2ff736a7f609a84dedd") + version("2.4.0", tag="openbabel-2-4-0", commit="087f33320e6796f39e6a1da04f4de7ec46bec4af") variant("python", default=True, description="Build Python bindings") variant("gui", default=True, description="Build with GUI") @@ -44,7 +44,7 @@ class Openbabel(CMakePackage): depends_on("pango", when="+cairo") # custom cairo requires custom pango depends_on("eigen@3.0:") # required if using the language bindings depends_on("libxml2") # required to read/write CML files, XML formats - depends_on("zlib") # required to support reading gzipped files + depends_on("zlib-api") # required to support reading gzipped files depends_on("rapidjson") # required to support JSON depends_on("libsm") depends_on("uuid") diff --git a/packages/py-astropy/package.py b/packages/py-astropy/package.py index 47bd618496931d77ed46838265318fe113be113b..d0707cc8eeac91f1e577eea646dca47125fb1ffc 100644 --- a/packages/py-astropy/package.py +++ b/packages/py-astropy/package.py @@ -15,6 +15,7 @@ class PyAstropy(PythonPackage): homepage = "https://astropy.org/" pypi = "astropy/astropy-4.0.1.post1.tar.gz" + git = "https://github.com/astropy/astropy.git" version("5.2.2", sha256="e6a9e34716bda5945788353c63f0644721ee7e5447d16b1cdcb58c48a96b0d9c") version("5.1", sha256="1db1b2c7eddfc773ca66fa33bd07b25d5b9c3b5eee2b934e0ca277fa5b1b7b7e") @@ -26,17 +27,15 @@ class PyAstropy(PythonPackage): version("1.1.2", sha256="6f0d84cd7dfb304bb437dda666406a1d42208c16204043bc920308ff8ffdfad1") version("1.1.post1", sha256="64427ec132620aeb038e4d8df94d6c30df4cc8b1c42a6d8c5b09907a31566a21") - variant("extras", default=False, description="Enable extra functionality") + variant("all", default=False, when="@3.2:", description="Enable all functionality") # Required dependencies depends_on("python@3.8:", when="@5.1:", type=("build", "run")) - depends_on("python@3.6:", when="@4.0:", type=("build", "run")) - depends_on("python@3.5:", when="@3.0:", type=("build", "run")) - depends_on("python@2.7:2.8,3.4:", when="@2.0:", type=("build", "run")) - depends_on("python@2.7:2.8,3.3:", when="@1.2:", type=("build", "run")) - depends_on("python@2.6:", type=("build", "run")) depends_on("py-setuptools", type="build") depends_on("py-cython@0.29.13:", type="build") + # in newer pip versions --install-option does not exist + depends_on("py-pip@:23.0", type="build") + depends_on("py-numpy@1.18:", when="@5.1:", type=("build", "run")) depends_on("py-numpy@1.16:", when="@4.0:", type=("build", "run")) depends_on("py-numpy@1.13:", when="@3.1:", type=("build", "run")) @@ -52,24 +51,47 @@ class PyAstropy(PythonPackage): depends_on("py-extension-helpers", when="@5.1:", type="build") depends_on("pkgconfig", type="build") + depends_on("py-pytest@7:", type="test") + depends_on("py-pytest-doctestplus@0.12:", type="test") + depends_on("py-pytest-astropy-header@0.2.1:", type="test") + depends_on("py-pytest-astropy@0.10:", type="test") + depends_on("py-pytest-xdist", type="test") + # Optional dependencies - depends_on("py-scipy@0.18:", when="+extras", type=("build", "run")) - depends_on("py-h5py", when="+extras", type=("build", "run")) - depends_on("py-beautifulsoup4", when="+extras", type=("build", "run")) - depends_on("py-html5lib", when="+extras", type=("build", "run")) - depends_on("py-bleach", when="+extras", type=("build", "run")) - depends_on("py-pyyaml", when="+extras", type=("build", "run")) - depends_on("py-pandas", when="+extras", type=("build", "run")) - depends_on("py-bintrees", when="+extras", type=("build", "run")) - depends_on("py-sortedcontainers", when="+extras", type=("build", "run")) - depends_on("py-pytz", when="+extras", type=("build", "run")) - depends_on("py-jplephem", when="+extras", type=("build", "run")) - depends_on("py-matplotlib@2.0:", when="+extras", type=("build", "run")) - depends_on("py-scikit-image", when="+extras", type=("build", "run")) - depends_on("py-mpmath", when="+extras", type=("build", "run")) - depends_on("py-asdf@2.3:", when="+extras", type=("build", "run")) - depends_on("py-bottleneck", when="+extras", type=("build", "run")) - depends_on("py-pytest", when="+extras", type=("build", "run")) + with when("+all"): + depends_on("py-scipy@1.3:", when="@5:", type=("build", "run")) + depends_on("py-scipy@0.18:", type=("build", "run")) + depends_on("py-matplotlib@3.1:", when="@5:", type=("build", "run")) + depends_on("py-matplotlib@2.1:", when="@4:", type=("build", "run")) + depends_on("py-matplotlib@2.0:", type=("build", "run")) + depends_on("py-certifi", when="@4.3:", type=("build", "run")) + depends_on("py-dask+array", when="@4.1:", type=("build", "run")) + depends_on("py-h5py", type=("build", "run")) + depends_on("py-pyarrow@5:", when="@5:", type=("build", "run")) + depends_on("py-beautifulsoup4", type=("build", "run")) + depends_on("py-html5lib", type=("build", "run")) + depends_on("py-bleach", type=("build", "run")) + depends_on("py-pandas", type=("build", "run")) + depends_on("py-sortedcontainers", type=("build", "run")) + depends_on("py-pytz", type=("build", "run")) + depends_on("py-jplephem", type=("build", "run")) + depends_on("py-mpmath", type=("build", "run")) + depends_on("py-asdf@2.10:", when="@5.1:", type=("build", "run")) + depends_on("py-asdf@2.5:", when="@4.0.1post1:", type=("build", "run")) + depends_on("py-asdf@2.3:", type=("build", "run")) + depends_on("py-bottleneck", type=("build", "run")) + depends_on("py-ipython@4.2:", when="@4.3:", type=("build", "run")) + depends_on("py-ipython", type=("build", "run")) + depends_on("py-pytest@7:", when="@5.0.2:", type=("build", "run")) + depends_on("py-pytest", type=("build", "run")) + depends_on("py-typing-extensions@3.10.0.1:", when="@5.0.2:", type=("build", "run")) + + # Historical optional dependencies + depends_on("py-pyyaml", when="@:5", type=("build", "run")) + depends_on("py-scikit-image", when="@:4.0", type=("build", "run")) + depends_on("py-bintrees", when="@:3.2.1", type=("build", "run")) + + conflicts("^py-matplotlib@3.4.0,3.5.2") # System dependencies depends_on("erfa") @@ -101,3 +123,12 @@ class PyAstropy(PythonPackage): def install_test(self): with working_dir("spack-test", create=True): python("-c", "import astropy; astropy.test()") + + @property + def skip_modules(self): + modules = [] + + if self.spec.satisfies("~extras"): + modules.append("astropy.visualization.wcsaxes") + + return modules diff --git a/packages/py-ipycanvas/package.py b/packages/py-ipycanvas/package.py index 4456c1fdfac3679290a84f517169a9c88f331500..0b70aa45e00cf3f140ffddef478acc44d364fa6d 100644 --- a/packages/py-ipycanvas/package.py +++ b/packages/py-ipycanvas/package.py @@ -22,9 +22,7 @@ class PyIpycanvas(PythonPackage): depends_on("python@3.6:", when="@10:", type=("build", "run")) depends_on("python@3.7:", when="@11:", type=("build", "run")) depends_on("py-setuptools@40.8:", type="build") - # TODO: replace this after concretizer learns how to concretize separate build deps - depends_on("py-jupyter-packaging7", type="build") - # depends_on('py-jupyter-packaging@0.7.0:0.7', type='build') + depends_on("py-jupyter-packaging@0.7", type="build") depends_on("py-jupyterlab@3.0:3", type="build") depends_on("py-ipywidgets@7.6:", type=("build", "run")) depends_on("pil@6:", type=("build", "run")) diff --git a/packages/py-matplotlib-scalebar/package.py b/packages/py-matplotlib-scalebar/package.py deleted file mode 100644 index 31907e85922ecf0ccd2f057f4329f31d380afd29..0000000000000000000000000000000000000000 --- a/packages/py-matplotlib-scalebar/package.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack.package import * - - -class PyMatplotlibScalebar(PythonPackage): - """Matplotlib-Scalebar provides a new artist for matplotlib to display a scale bar, aka micron bar.""" - - homepage = "https://kolibril13.github.io/plywood-gallery-matplotlib-scalebar/" - pypi = "matplotlib-scalebar/matplotlib-scalebar-0.8.1.tar.gz" - git = "https://github.com/ppinard/matplotlib-scalebar.git" - - # list of GitHub accounts to notify when the package is updated. - maintainers = ["ppinard"] - - version("0.8.1", sha256="14887af1093579c5e6afae51a0a1ecc3f715cdbc5c4d7ef59cdeec76ee6bb15d") - - depends_on("py-matplotlib", type=("build", "run")) diff --git a/packages/py-pynrrd/package.py b/packages/py-pynrrd/package.py deleted file mode 100644 index 99093c34d46e6e8a116842e9db56449cfe0238fe..0000000000000000000000000000000000000000 --- a/packages/py-pynrrd/package.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack.package import * - - -class PyPynrrd(PythonPackage): - """Python library for reading and writing NRRD files into and from numpy arrays""" - - homepage = "https://github.com/mhe/pynrrd" - pypi = "pynrrd/pynrrd-0.4.0.tar.gz" - - version("1.0.0", sha256="4eb4caba03fbca1b832114515e748336cb67bce70c7f3ae36bfa2e135fc990d2") - - depends_on("py-setuptools", type="build") - depends_on("py-numpy@1.11.1:", type=("build", "run")) - depends_on("py-nptyping", type=("build", "run")) - depends_on("py-typing-extensions", type=("build", "run")) - diff --git a/packages/sbml/package.py b/packages/sbml/package.py index 25504b607647581f8b1efdf4a48185bb7239a62d..52abe1383d4136f6a3217290f27c6e14371b6d4f 100644 --- a/packages/sbml/package.py +++ b/packages/sbml/package.py @@ -60,7 +60,7 @@ class Sbml(CMakePackage): depends_on("swig@2:", type="build") depends_on("cmake", type="build") - depends_on("zlib") + depends_on("zlib-api") depends_on("bzip2") depends_on("libxml2")