pdi: refactor version handling and update to 1.8.3 (#49276)
* Refactor version handling * Pdi fixes # Conflicts: # var/spack/repos/builtin/packages/pdi/package.py * Details
This commit is contained in:
parent
3fd6066e54
commit
76168292c3
@ -17,14 +17,25 @@ class Pdi(CMakePackage):
|
||||
|
||||
homepage = "https://pdi.dev"
|
||||
git = "https://github.com/pdidev/pdi.git"
|
||||
url = "https://github.com/pdidev/pdi/archive/refs/tags/1.8.0.tar.gz"
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
maintainers("jbigot")
|
||||
|
||||
version("develop", branch="main", no_cache=True)
|
||||
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
|
||||
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
|
||||
version("1.8.3", sha256="df7200289a2a368ec874140039b417abdfe681b57fb1b9f4c52f924952226020")
|
||||
version("1.8.2", sha256="bb4d1654c97f7ff379067adbff339f8b4117c0cf9432f41f1a5cb20a747cac1a")
|
||||
version(
|
||||
"1.8.1",
|
||||
sha256="43f0c0b2bda5515ecf99da7be1600af2c1f669d6c73e3f309275b14940c7e35c",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.8.0",
|
||||
sha256="5d353bfa64f45ee4715b88bd30330030f79f2020cd6bede0ad9b8f9beddadea9",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
variant("benchs", default=False, description="Build benchmarks")
|
||||
variant("docs", default=False, description="Build documentation")
|
||||
@ -36,15 +47,19 @@ class Pdi(CMakePackage):
|
||||
depends_on("cxx", type="build")
|
||||
depends_on("fortran", type="build", when="+fortran")
|
||||
|
||||
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
|
||||
depends_on("doxygen@1.8.17:", type=("build"), when="@1.8: +docs")
|
||||
depends_on("paraconf@1:", type=("link", "run"), when="@1.6:")
|
||||
depends_on("cmake@3.16.3:", type=("build"))
|
||||
depends_on("doxygen@1.8.17:", type=("build"), when="+docs")
|
||||
depends_on("paraconf@1: +shared", type=("link", "run"))
|
||||
depends_on("paraconf +fortran", type=("link", "run"), when="+fortran")
|
||||
depends_on("paraconf@0.4.14: +shared", type=("link", "run"))
|
||||
depends_on("pkgconfig", type=("build"))
|
||||
depends_on("python@3.8.2:3.11.9", type=("build", "link", "run"), when="@1.8: +python")
|
||||
depends_on("py-pybind11@2.3:2", type=("link"), when="+python")
|
||||
depends_on("py-pybind11@2.4.3:", type=("link"), when="@1.8: +python")
|
||||
depends_on("python@3.8.2:3", type=("build", "link", "run"), when="+python")
|
||||
depends_on(
|
||||
"python@3:3.11.9", type=("build", "link", "run"), when="@:1.8.2 +python"
|
||||
) # Needs distutils.
|
||||
depends_on("py-pybind11@2.4.3:2", type=("link"), when="+python")
|
||||
depends_on(
|
||||
"py-setuptools", type=("build", "link"), when="@1.8.3: +python^python@3.12:"
|
||||
) # Needs distutils.
|
||||
depends_on("spdlog@1.5:", type=("link"), when="@1.5:")
|
||||
|
||||
root_cmakelists_dir = "pdi"
|
||||
@ -62,12 +77,18 @@ def patch(self):
|
||||
"vendor/zpp-1.0.16/bin/zpp.in",
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def version_url(version):
|
||||
return f"https://github.com/pdidev/pdi/archive/refs/tags/{version}.tar.gz"
|
||||
|
||||
def url_for_version(self, version):
|
||||
return Pdi.version_url(version)
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
return [
|
||||
self.define_from_variant("BUILD_BENCHMARKING", "benchs"),
|
||||
self.define_from_variant("BUILD_DOCUMENTATION", "docs"),
|
||||
self.define_from_variant("BUILD_FORTRAN", "fortran"),
|
||||
self.define_from_variant("BUILD_PYTHON", "python"),
|
||||
self.define_from_variant("BUILD_TESTING", "tests"),
|
||||
]
|
||||
return args
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
from spack import *
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.pdi import Pdi
|
||||
|
||||
|
||||
class PdipluginDeclHdf5(CMakePackage):
|
||||
@ -14,14 +15,14 @@ class PdipluginDeclHdf5(CMakePackage):
|
||||
|
||||
homepage = "https://pdi.dev"
|
||||
git = "https://github.com/pdidev/pdi.git"
|
||||
url = "https://github.com/pdidev/pdi/archive/refs/tags/1.8.0.tar.gz"
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
maintainers("jbigot")
|
||||
|
||||
version("develop", branch="main", no_cache=True)
|
||||
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
|
||||
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
|
||||
for v in Pdi.versions:
|
||||
version(str(v), **Pdi.versions[v])
|
||||
|
||||
variant("benchs", default=False, description="Build benchmarks")
|
||||
variant("fortran", default=True, description="Enable Fortran (for tests only)")
|
||||
@ -32,26 +33,25 @@ class PdipluginDeclHdf5(CMakePackage):
|
||||
depends_on("cxx", type="build")
|
||||
depends_on("fortran", type="build", when="+fortran")
|
||||
|
||||
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
|
||||
depends_on("hdf5@1.10.4:1 +shared", type=("build", "link", "run"), when="@1.8:")
|
||||
depends_on("cmake@3.16.3:", type=("build"))
|
||||
depends_on("hdf5@1.10.4:1 +shared", type=("build", "link", "run"))
|
||||
depends_on("hdf5 +mpi", type=("build", "link", "run"), when="+mpi")
|
||||
depends_on("pdi@develop", type=("link", "run"), when="@develop")
|
||||
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
|
||||
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
|
||||
for v in Pdi.versions:
|
||||
depends_on("pdi@" + str(v), type=("link", "run"), when="@" + str(v))
|
||||
depends_on("pkgconfig", type=("build"))
|
||||
|
||||
root_cmakelists_dir = "plugins/decl_hdf5"
|
||||
|
||||
def url_for_version(self, version):
|
||||
return Pdi.version_url(version)
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
"-DBUILD_BENCHMARKING:BOOL={:s}".format("ON" if "+benchs" in self.spec else "OFF"),
|
||||
return [
|
||||
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
|
||||
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
|
||||
"-DBUILD_FORTRAN:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
|
||||
"-DBUILD_HDF5_PARALLEL:BOOL={:s}".format("ON" if "+mpi" in self.spec else "OFF"),
|
||||
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
|
||||
self.define_from_variant("BUILD_BENCHMARKING", "benchs"),
|
||||
self.define_from_variant("BUILD_HDF5_PARALLEL", "mpi"),
|
||||
self.define_from_variant("BUILD_TESTING", "tests"),
|
||||
]
|
||||
return args
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
env.prepend_path("PDI_PLUGIN_PATH", self.prefix.lib)
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
from spack import *
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.pdi import Pdi
|
||||
|
||||
|
||||
class PdipluginDeclNetcdf(CMakePackage):
|
||||
@ -12,14 +13,14 @@ class PdipluginDeclNetcdf(CMakePackage):
|
||||
|
||||
homepage = "https://pdi.dev"
|
||||
git = "https://github.com/pdidev/pdi.git"
|
||||
url = "https://github.com/pdidev/pdi/archive/refs/tags/1.8.0.tar.gz"
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
maintainers("jbigot")
|
||||
|
||||
version("develop", branch="main", no_cache=True)
|
||||
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
|
||||
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
|
||||
for v in Pdi.versions:
|
||||
version(str(v), **Pdi.versions[v])
|
||||
|
||||
variant("tests", default=False, description="Build tests")
|
||||
variant("mpi", default=True, description="Enable parallel NetCDF")
|
||||
@ -27,23 +28,24 @@ class PdipluginDeclNetcdf(CMakePackage):
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
|
||||
depends_on("netcdf-c@4.7.3:4", type=("link"), when="@1.8:")
|
||||
depends_on("netcdf-c@4.6.2:4+mpi", type=("link"), when="+mpi")
|
||||
depends_on("pdi@develop", type=("link", "run"), when="@develop")
|
||||
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
|
||||
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
|
||||
depends_on("cmake@3.16.3:", type=("build"))
|
||||
depends_on("netcdf-c@4.7.3:4", type=("link"))
|
||||
depends_on("netcdf-c+mpi", type=("link"), when="+mpi")
|
||||
for v in Pdi.versions:
|
||||
depends_on("pdi@" + str(v), type=("link", "run"), when="@" + str(v))
|
||||
depends_on("pkgconfig", type=("build"))
|
||||
|
||||
root_cmakelists_dir = "plugins/decl_netcdf"
|
||||
|
||||
def url_for_version(self, version):
|
||||
return Pdi.version_url(version)
|
||||
|
||||
def cmake_args(self):
|
||||
return [
|
||||
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
|
||||
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
|
||||
"-DBUILD_HDF5_PARALLEL:BOOL={:s}".format("ON" if "+mpi" in self.spec else "OFF"),
|
||||
"-DBUILD_NETCDF_PARALLEL:BOOL={:s}".format("ON" if "+mpi" in self.spec else "OFF"),
|
||||
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
|
||||
self.define_from_variant("BUILD_HDF5_PARALLEL", "mpi"),
|
||||
self.define_from_variant("BUILD_NETCDF_PARALLEL", "mpi"),
|
||||
self.define_from_variant("BUILD_TESTING", "tests"),
|
||||
]
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
from spack import *
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.pdi import Pdi
|
||||
|
||||
|
||||
class PdipluginMpi(CMakePackage):
|
||||
@ -11,36 +12,36 @@ class PdipluginMpi(CMakePackage):
|
||||
|
||||
homepage = "https://pdi.dev"
|
||||
git = "https://github.com/pdidev/pdi.git"
|
||||
url = "https://github.com/pdidev/pdi/archive/refs/tags/1.8.0.tar.gz"
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
maintainers("jbigot")
|
||||
|
||||
version("develop", branch="main", no_cache=True)
|
||||
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
|
||||
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
|
||||
for v in Pdi.versions:
|
||||
version(str(v), **Pdi.versions[v])
|
||||
|
||||
variant("tests", default=False, description="Build tests")
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
|
||||
depends_on("cmake@3.16.3:", type=("build"))
|
||||
depends_on("mpi", type=("build", "link", "run"))
|
||||
depends_on("pdi@develop", type=("link", "run"), when="@develop")
|
||||
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
|
||||
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
|
||||
for v in Pdi.versions:
|
||||
depends_on("pdi@" + str(v), type=("link", "run"), when="@" + str(v))
|
||||
depends_on("pkgconfig", type=("build"))
|
||||
|
||||
root_cmakelists_dir = "plugins/mpi"
|
||||
|
||||
def url_for_version(self, version):
|
||||
return Pdi.version_url(version)
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
return [
|
||||
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
|
||||
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
|
||||
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
|
||||
self.define_from_variant("BUILD_TESTING", "tests"),
|
||||
]
|
||||
return args
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
env.prepend_path("PDI_PLUGIN_PATH", self.prefix.lib)
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
from spack import *
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.pdi import Pdi
|
||||
|
||||
|
||||
class PdipluginPycall(CMakePackage):
|
||||
@ -11,34 +12,36 @@ class PdipluginPycall(CMakePackage):
|
||||
|
||||
homepage = "https://pdi.dev"
|
||||
git = "https://github.com/pdidev/pdi.git"
|
||||
url = "https://github.com/pdidev/pdi/archive/refs/tags/1.8.0.tar.gz"
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
maintainers("jbigot")
|
||||
|
||||
version("develop", branch="main", no_cache=True)
|
||||
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
|
||||
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
|
||||
for v in Pdi.versions:
|
||||
version(str(v), **Pdi.versions[v])
|
||||
|
||||
variant("tests", default=False, description="Build tests")
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
|
||||
depends_on("pdi+python@develop", type=("link", "run"), when="@develop")
|
||||
depends_on("pdi+python@1.8.1", type=("link", "run"), when="@1.8.1")
|
||||
depends_on("pdi+python@1.8.0", type=("link", "run"), when="@1.8.0")
|
||||
depends_on("cmake@3.16.3:", type=("build"))
|
||||
for v in Pdi.versions:
|
||||
depends_on("pdi+python@" + str(v), type=("link", "run"), when="@" + str(v))
|
||||
depends_on("py-setuptools", type=("build"), when="@1.8.3: ^python@3.12:")
|
||||
depends_on("pkgconfig", type=("build"))
|
||||
|
||||
root_cmakelists_dir = "plugins/pycall"
|
||||
|
||||
def url_for_version(self, version):
|
||||
return Pdi.version_url(version)
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
return [
|
||||
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
|
||||
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
|
||||
self.define_from_variant("BUILD_TESTING", "tests"),
|
||||
]
|
||||
return args
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
env.prepend_path("PDI_PLUGIN_PATH", self.prefix.lib)
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
from spack import *
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.pdi import Pdi
|
||||
|
||||
|
||||
class PdipluginSerialize(CMakePackage):
|
||||
@ -12,34 +13,34 @@ class PdipluginSerialize(CMakePackage):
|
||||
|
||||
homepage = "https://pdi.dev"
|
||||
git = "https://github.com/pdidev/pdi.git"
|
||||
url = "https://github.com/pdidev/pdi/archive/refs/tags/1.8.0.tar.gz"
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
maintainers("jbigot")
|
||||
|
||||
version("develop", branch="main", no_cache=True)
|
||||
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
|
||||
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
|
||||
for v in Pdi.versions:
|
||||
version(str(v), **Pdi.versions[v])
|
||||
|
||||
variant("tests", default=False, description="Build tests")
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
|
||||
depends_on("pdi@develop", type=("link", "run"), when="@develop")
|
||||
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
|
||||
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
|
||||
depends_on("cmake@3.16.3:", type=("build"))
|
||||
for v in Pdi.versions:
|
||||
depends_on("pdi@" + str(v), type=("link", "run"), when="@" + str(v))
|
||||
depends_on("pkgconfig", type=("build"))
|
||||
|
||||
root_cmakelists_dir = "plugins/serialize"
|
||||
|
||||
def url_for_version(self, version):
|
||||
return Pdi.version_url(version)
|
||||
|
||||
def cmake_args(self):
|
||||
return [
|
||||
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
|
||||
"-DBUILD_FORTRAN:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
|
||||
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
|
||||
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
|
||||
self.define_from_variant("BUILD_TESTING", "tests"),
|
||||
]
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
from spack import *
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.pdi import Pdi
|
||||
|
||||
|
||||
class PdipluginSetValue(CMakePackage):
|
||||
@ -12,34 +13,35 @@ class PdipluginSetValue(CMakePackage):
|
||||
|
||||
homepage = "https://pdi.dev"
|
||||
git = "https://github.com/pdidev/pdi.git"
|
||||
url = "https://github.com/pdidev/pdi/archive/refs/tags/1.8.0.tar.gz"
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
maintainers("jbigot")
|
||||
|
||||
version("develop", branch="main", no_cache=True)
|
||||
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
|
||||
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
|
||||
for v in Pdi.versions:
|
||||
version(str(v), **Pdi.versions[v])
|
||||
|
||||
variant("tests", default=False, description="Build tests")
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
|
||||
depends_on("pdi@develop", type=("link", "run"), when="@develop")
|
||||
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
|
||||
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
|
||||
depends_on("cmake@3.16.3:", type=("build"))
|
||||
for v in Pdi.versions:
|
||||
depends_on("pdi@" + str(v), type=("link", "run"), when="@" + str(v))
|
||||
depends_on("pkgconfig", type=("build"))
|
||||
depends_on("spdlog@1.5:", type=("link"), when="@1.5:")
|
||||
depends_on("spdlog@1.5:", type=("link"))
|
||||
|
||||
root_cmakelists_dir = "plugins/set_value"
|
||||
|
||||
def url_for_version(self, version):
|
||||
return Pdi.version_url(version)
|
||||
|
||||
def cmake_args(self):
|
||||
return [
|
||||
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
|
||||
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
|
||||
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
|
||||
self.define_from_variant("BUILD_TESTING", "tests"),
|
||||
]
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
from spack import *
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.pdi import Pdi
|
||||
|
||||
|
||||
class PdipluginTrace(CMakePackage):
|
||||
@ -12,33 +13,34 @@ class PdipluginTrace(CMakePackage):
|
||||
|
||||
homepage = "https://pdi.dev"
|
||||
git = "https://github.com/pdidev/pdi.git"
|
||||
url = "https://github.com/pdidev/pdi/archive/refs/tags/1.8.0.tar.gz"
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
maintainers("jbigot")
|
||||
|
||||
version("develop", branch="main", no_cache=True)
|
||||
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
|
||||
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
|
||||
for v in Pdi.versions:
|
||||
version(str(v), **Pdi.versions[v])
|
||||
|
||||
variant("tests", default=False, description="Build tests")
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
|
||||
depends_on("pdi@develop", type=("link", "run"), when="@develop")
|
||||
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
|
||||
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
|
||||
depends_on("cmake@3.16.3:", type=("build"))
|
||||
for v in Pdi.versions:
|
||||
depends_on("pdi@" + str(v), type=("link", "run"), when="@" + str(v))
|
||||
depends_on("pkgconfig", type=("build"))
|
||||
|
||||
root_cmakelists_dir = "plugins/trace"
|
||||
|
||||
def url_for_version(self, version):
|
||||
return Pdi.version_url(version)
|
||||
|
||||
def cmake_args(self):
|
||||
return [
|
||||
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
|
||||
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
|
||||
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
|
||||
self.define_from_variant("BUILD_TESTING", "tests"),
|
||||
]
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
from spack import *
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.pdi import Pdi
|
||||
|
||||
|
||||
class PdipluginUserCode(CMakePackage):
|
||||
@ -13,35 +14,35 @@ class PdipluginUserCode(CMakePackage):
|
||||
|
||||
homepage = "https://pdi.dev"
|
||||
git = "https://github.com/pdidev/pdi.git"
|
||||
url = "https://github.com/pdidev/pdi/archive/refs/tags/1.8.0.tar.gz"
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
maintainers("jbigot")
|
||||
|
||||
version("develop", branch="main", no_cache=True)
|
||||
version("1.8.1", commit="105161d5c93431d674c73ef365dce3eb724b4fcb")
|
||||
version("1.8.0", commit="edce72fc198475bab1541cc0b77a30ad02da91c5")
|
||||
for v in Pdi.versions:
|
||||
version(str(v), **Pdi.versions[v])
|
||||
|
||||
variant("tests", default=False, description="Build tests")
|
||||
|
||||
depends_on("c", type="build")
|
||||
depends_on("cxx", type="build")
|
||||
|
||||
depends_on("cmake@3.16.3:", type=("build"), when="@1.8:")
|
||||
depends_on("pdi@develop", type=("link", "run"), when="@develop")
|
||||
depends_on("pdi@1.8.1", type=("link", "run"), when="@1.8.1")
|
||||
depends_on("pdi@1.8.0", type=("link", "run"), when="@1.8.0")
|
||||
depends_on("cmake@3.16.3:", type=("build"))
|
||||
for v in Pdi.versions:
|
||||
depends_on("pdi@" + str(v), type=("link", "run"), when="@" + str(v))
|
||||
depends_on("pkgconfig", type=("build"))
|
||||
|
||||
root_cmakelists_dir = "plugins/user_code"
|
||||
|
||||
def url_for_version(self, version):
|
||||
return Pdi.version_url(version)
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
return [
|
||||
"-DINSTALL_PDIPLUGINDIR:PATH={:s}".format(self.prefix.lib),
|
||||
"-DBUILD_TESTING:BOOL={:s}".format("ON" if "+tests" in self.spec else "OFF"),
|
||||
"-DBUILD_CFG_VALIDATOR:BOOL=OFF",
|
||||
self.define_from_variant("BUILD_TESTING", "tests"),
|
||||
]
|
||||
return args
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
env.prepend_path("PDI_PLUGIN_PATH", self.prefix.lib)
|
||||
|
Loading…
Reference in New Issue
Block a user