summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Riehecky <3534830+jcpunk@users.noreply.github.com>2022-02-01 03:22:52 -0600
committerGitHub <noreply@github.com>2022-02-01 10:22:52 +0100
commit4b52f0e4d739998b8aca49356d66fadd0b22af17 (patch)
treeafa9f59765e8e4ba28c643e4644787aa92f4fc09
parentd8dcb91297097a335ceadc5329f67b4d6d019613 (diff)
downloadspack-4b52f0e4d739998b8aca49356d66fadd0b22af17.tar.gz
spack-4b52f0e4d739998b8aca49356d66fadd0b22af17.tar.bz2
spack-4b52f0e4d739998b8aca49356d66fadd0b22af17.tar.xz
spack-4b52f0e4d739998b8aca49356d66fadd0b22af17.zip
jsonnet: add new package (#28645)
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/jsonnet/package.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/jsonnet/package.py b/var/spack/repos/builtin/packages/jsonnet/package.py
new file mode 100644
index 0000000000..53b2767f97
--- /dev/null
+++ b/var/spack/repos/builtin/packages/jsonnet/package.py
@@ -0,0 +1,39 @@
+# 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 import *
+
+
+class Jsonnet(MakefilePackage):
+ """A data templating language for app and tool developers based on JSON"""
+
+ homepage = "https://jsonnet.org/"
+ git = "https://github.com/google/jsonnet.git"
+ url = "https://github.com/google/jsonnet/archive/refs/tags/v0.18.0.tar.gz"
+
+ maintainers = ["jcpunk"]
+
+ version("master", branch="master")
+ version("0.18.0", sha256sum="85c240c4740f0c788c4d49f9c9c0942f5a2d1c2ae58b2c71068107bc80a3ced4")
+ version("0.17.0", sha256sum="076b52edf888c01097010ad4299e3b2e7a72b60a41abbc65af364af1ed3c8dbe")
+
+ conflicts("%gcc@:5.4.99", when="@0.18.0:")
+
+ variant("python", default=False, description="Provide Python bindings for jsonnet")
+ extends("python", when="+python")
+ depends_on("py-setuptools", type=("build",), when="+python")
+ depends_on("py-pip", type=("build",), when="+python")
+ depends_on("py-wheel", type=("build",), when="+python")
+
+ @property
+ def install_targets(self):
+ return ["PREFIX={0}".format(self.prefix), "install"]
+
+ @run_after("install")
+ def python_install(self):
+ if "+python" in self.spec:
+ args = std_pip_args + ["--prefix=" + self.prefix, "."]
+ pip(*args)