From 4185e480d214f0aa66ab1b7cd9003cb7ad103c89 Mon Sep 17 00:00:00 2001 From: Kolja Kauder Date: Mon, 17 Jun 2024 14:03:55 -0400 Subject: [PATCH 01/13] package for hepmc merger --- packages/hepmcmerger/package.py | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 packages/hepmcmerger/package.py diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py new file mode 100644 index 0000000..ef84f9b --- /dev/null +++ b/packages/hepmcmerger/package.py @@ -0,0 +1,53 @@ +# Copyright 2013-2024 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) + +# ---------------------------------------------------------------------------- +# If you submit this package back to Spack as a pull request, +# please first remove this boilerplate and all FIXME comments. +# +# This is a template package file for Spack. We've put "FIXME" +# next to all the things you'll want to change. Once you've handled +# them, you can save this file and test your package like this: +# +# spack install hepmcmerger +# +# You can edit this file again by typing: +# +# spack edit hepmcmerger +# +# See the Spack documentation for more information on packaging. +# ---------------------------------------------------------------------------- + +from spack.package import * + + +class Hepmcmerger(Package): + """An EIC HepMC merger to combine signal and background events.""" + + # FIXME: Add a proper url for your package's homepage here. + homepage = "https://github.com/eic/HEPMC_Merger + url = "https://github.com/eic/HEPMC_Merger/releases/tag/v1.0.3" + list_url = "https://github.com/eic/HEPMC_Merger/tags" + git = "https://github.com/eic/HEPMC_Merger" + + maintainers = ["kkauder"] + + tags = ["eic"] + + version("main", branch="main") + version("v1.0.3", sha256="d09c3ce65cc41a5f0bed4111deaa2d0d0e37173725c4caf873fd8f312f37096e") + version("v1.0.2", sha256="50d8be2b69cf87460c69bf261cf61c64587ea5aadcfe344aec1b0a1d8b59b386") + version("v1.0.1", sha256="f244ff4de311c164597eaedf547a7305b6d3cc1e6b2bc6e6d9acb8e603a44a4b") + version("v1.0.0", sha256="c6088ba6ce73a92d165bc82e19f6670a1545fcfb6f352cdf5629c395a95c16af") + + depends_on("hepmc3") + depends_on("root") + + def cmake_args(self): + args = [] + args.append( + "-DCMAKE_CXX_STANDARD=%s" % self.spec["root"].variants["cxxstd"].value + ) + return args \ No newline at end of file From e03363bf3e137948c010d7a5256e2ed97a165ec7 Mon Sep 17 00:00:00 2001 From: Kolja Kauder Date: Mon, 17 Jun 2024 14:16:33 -0400 Subject: [PATCH 02/13] More tags for hepmc --- packages/hepmcmerger/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py index ef84f9b..e166049 100644 --- a/packages/hepmcmerger/package.py +++ b/packages/hepmcmerger/package.py @@ -28,7 +28,7 @@ class Hepmcmerger(Package): # FIXME: Add a proper url for your package's homepage here. homepage = "https://github.com/eic/HEPMC_Merger - url = "https://github.com/eic/HEPMC_Merger/releases/tag/v1.0.3" + url = "https://github.com/eic/HEPMC_Merger/releases/tag/v1.0.4" list_url = "https://github.com/eic/HEPMC_Merger/tags" git = "https://github.com/eic/HEPMC_Merger" @@ -37,6 +37,7 @@ class Hepmcmerger(Package): tags = ["eic"] version("main", branch="main") + version("v1.0.4", sha256="2255363aecdf53ad926002656dd404319b77d287127b82894aa54c91ae482688") version("v1.0.3", sha256="d09c3ce65cc41a5f0bed4111deaa2d0d0e37173725c4caf873fd8f312f37096e") version("v1.0.2", sha256="50d8be2b69cf87460c69bf261cf61c64587ea5aadcfe344aec1b0a1d8b59b386") version("v1.0.1", sha256="f244ff4de311c164597eaedf547a7305b6d3cc1e6b2bc6e6d9acb8e603a44a4b") From 793312e2ee62b92dee5bada2be3fe38fb13e0aca Mon Sep 17 00:00:00 2001 From: Kolja Kauder Date: Mon, 17 Jun 2024 14:23:20 -0400 Subject: [PATCH 03/13] typo --- packages/hepmcmerger/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py index e166049..1f958fb 100644 --- a/packages/hepmcmerger/package.py +++ b/packages/hepmcmerger/package.py @@ -27,7 +27,7 @@ class Hepmcmerger(Package): """An EIC HepMC merger to combine signal and background events.""" # FIXME: Add a proper url for your package's homepage here. - homepage = "https://github.com/eic/HEPMC_Merger + homepage = "https://github.com/eic/HEPMC_Merger" url = "https://github.com/eic/HEPMC_Merger/releases/tag/v1.0.4" list_url = "https://github.com/eic/HEPMC_Merger/tags" git = "https://github.com/eic/HEPMC_Merger" From b00434c7ff4eb34d7890f6625c9682026ea3de74 Mon Sep 17 00:00:00 2001 From: Kolja Kauder Date: Tue, 18 Jun 2024 12:00:39 -0400 Subject: [PATCH 04/13] removed boilerplate --- packages/hepmcmerger/package.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py index 1f958fb..349d0c5 100644 --- a/packages/hepmcmerger/package.py +++ b/packages/hepmcmerger/package.py @@ -3,22 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -# ---------------------------------------------------------------------------- -# If you submit this package back to Spack as a pull request, -# please first remove this boilerplate and all FIXME comments. -# -# This is a template package file for Spack. We've put "FIXME" -# next to all the things you'll want to change. Once you've handled -# them, you can save this file and test your package like this: -# -# spack install hepmcmerger -# -# You can edit this file again by typing: -# -# spack edit hepmcmerger -# -# See the Spack documentation for more information on packaging. -# ---------------------------------------------------------------------------- from spack.package import * From 0a60c37eb230c27fa56aae2913ed98fb6a235ee8 Mon Sep 17 00:00:00 2001 From: Kolja Kauder Date: Mon, 24 Jun 2024 10:59:56 -0400 Subject: [PATCH 05/13] Specified cmake --- packages/hepmcmerger/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py index 349d0c5..94c91cd 100644 --- a/packages/hepmcmerger/package.py +++ b/packages/hepmcmerger/package.py @@ -7,7 +7,7 @@ from spack.package import * -class Hepmcmerger(Package): +class Hepmcmerger(CMakePackage): """An EIC HepMC merger to combine signal and background events.""" # FIXME: Add a proper url for your package's homepage here. @@ -29,6 +29,7 @@ class Hepmcmerger(Package): depends_on("hepmc3") depends_on("root") + depends_on("cmake", type="build") def cmake_args(self): args = [] From 6a4c3e444c532c868aa259f9b799377b3b59bd5b Mon Sep 17 00:00:00 2001 From: Kolja Kauder Date: Tue, 25 Jun 2024 09:51:24 -0400 Subject: [PATCH 06/13] Wouter's suggestions --- packages/hepmcmerger/package.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py index 94c91cd..828d181 100644 --- a/packages/hepmcmerger/package.py +++ b/packages/hepmcmerger/package.py @@ -12,7 +12,7 @@ class Hepmcmerger(CMakePackage): # FIXME: Add a proper url for your package's homepage here. homepage = "https://github.com/eic/HEPMC_Merger" - url = "https://github.com/eic/HEPMC_Merger/releases/tag/v1.0.4" + url = "https://github.com/eic/HEPMC_Merger/archive/refs/tags/v1.0.4.tar.gz" list_url = "https://github.com/eic/HEPMC_Merger/tags" git = "https://github.com/eic/HEPMC_Merger" @@ -29,11 +29,10 @@ class Hepmcmerger(CMakePackage): depends_on("hepmc3") depends_on("root") - depends_on("cmake", type="build") def cmake_args(self): args = [] args.append( - "-DCMAKE_CXX_STANDARD=%s" % self.spec["root"].variants["cxxstd"].value + f"-DCMAKE_CXX_STANDARD={self.spec["root"].variants["cxxstd"].value}" ) return args \ No newline at end of file From e6caba6342d332f0b6ade390aea3189c15568fa8 Mon Sep 17 00:00:00 2001 From: Kolja Kauder Date: Tue, 25 Jun 2024 10:19:16 -0400 Subject: [PATCH 07/13] Undo buggy f string --- packages/hepmcmerger/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py index 828d181..c11ebcf 100644 --- a/packages/hepmcmerger/package.py +++ b/packages/hepmcmerger/package.py @@ -33,6 +33,6 @@ class Hepmcmerger(CMakePackage): def cmake_args(self): args = [] args.append( - f"-DCMAKE_CXX_STANDARD={self.spec["root"].variants["cxxstd"].value}" + "-DCMAKE_CXX_STANDARD=%s" % self.spec["root"].variants["cxxstd"].value ) return args \ No newline at end of file From affe6aa2d73f9346becb2926dcc833db8138d47d Mon Sep 17 00:00:00 2001 From: kkauder Date: Tue, 25 Jun 2024 14:17:07 -0400 Subject: [PATCH 08/13] Update packages/hepmcmerger/package.py Co-authored-by: Wouter Deconinck --- packages/hepmcmerger/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py index c11ebcf..d483e5c 100644 --- a/packages/hepmcmerger/package.py +++ b/packages/hepmcmerger/package.py @@ -16,7 +16,7 @@ class Hepmcmerger(CMakePackage): list_url = "https://github.com/eic/HEPMC_Merger/tags" git = "https://github.com/eic/HEPMC_Merger" - maintainers = ["kkauder"] + maintainers("kkauder") tags = ["eic"] From 602a666a67f2a415726e2dcade1e6703a4532a9d Mon Sep 17 00:00:00 2001 From: Kolja Kauder Date: Tue, 25 Jun 2024 14:28:26 -0400 Subject: [PATCH 09/13] f string 2nd attempt --- packages/hepmcmerger/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py index d483e5c..bf34208 100644 --- a/packages/hepmcmerger/package.py +++ b/packages/hepmcmerger/package.py @@ -33,6 +33,6 @@ class Hepmcmerger(CMakePackage): def cmake_args(self): args = [] args.append( - "-DCMAKE_CXX_STANDARD=%s" % self.spec["root"].variants["cxxstd"].value + f"-DCMAKE_CXX_STANDARD={self.spec['"root"'].variants['"cxxstd"'].value}" ) return args \ No newline at end of file From a848781fab94c3f1db6622a757741f78ed8b9188 Mon Sep 17 00:00:00 2001 From: kkauder Date: Tue, 25 Jun 2024 14:34:18 -0400 Subject: [PATCH 10/13] Update packages/hepmcmerger/package.py Co-authored-by: Wouter Deconinck --- packages/hepmcmerger/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py index bf34208..efe2a15 100644 --- a/packages/hepmcmerger/package.py +++ b/packages/hepmcmerger/package.py @@ -33,6 +33,6 @@ class Hepmcmerger(CMakePackage): def cmake_args(self): args = [] args.append( - f"-DCMAKE_CXX_STANDARD={self.spec['"root"'].variants['"cxxstd"'].value}" + self.define("CMAKE_CXX_STANDARD", self.spec["root"].variants["cxxstd"].value) ) return args \ No newline at end of file From 7469660605e9b97271effb0b42761e495ee03a16 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 5 Nov 2024 14:07:38 -0600 Subject: [PATCH 11/13] hepmcmerger: rm comment line; style --- packages/hepmcmerger/package.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py index efe2a15..bc1abd9 100644 --- a/packages/hepmcmerger/package.py +++ b/packages/hepmcmerger/package.py @@ -10,7 +10,6 @@ class Hepmcmerger(CMakePackage): """An EIC HepMC merger to combine signal and background events.""" - # FIXME: Add a proper url for your package's homepage here. homepage = "https://github.com/eic/HEPMC_Merger" url = "https://github.com/eic/HEPMC_Merger/archive/refs/tags/v1.0.4.tar.gz" list_url = "https://github.com/eic/HEPMC_Merger/tags" @@ -31,8 +30,7 @@ class Hepmcmerger(CMakePackage): depends_on("root") def cmake_args(self): - args = [] - args.append( - self.define("CMAKE_CXX_STANDARD", self.spec["root"].variants["cxxstd"].value) - ) - return args \ No newline at end of file + args = [ + self.define("CMAKE_CXX_STANDARD", self.spec["root"].variants["cxxstd"].value), + ] + return args From d1ec0d76ab3cd8d07480e41ebd6632c071c670d3 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 5 Nov 2024 14:16:21 -0600 Subject: [PATCH 12/13] hepmcmerger: canonicalize versions, git url --- packages/hepmcmerger/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py index bc1abd9..ce34365 100644 --- a/packages/hepmcmerger/package.py +++ b/packages/hepmcmerger/package.py @@ -13,18 +13,18 @@ class Hepmcmerger(CMakePackage): homepage = "https://github.com/eic/HEPMC_Merger" url = "https://github.com/eic/HEPMC_Merger/archive/refs/tags/v1.0.4.tar.gz" list_url = "https://github.com/eic/HEPMC_Merger/tags" - git = "https://github.com/eic/HEPMC_Merger" + git = "https://github.com/eic/HEPMC_Merger.git" maintainers("kkauder") tags = ["eic"] version("main", branch="main") - version("v1.0.4", sha256="2255363aecdf53ad926002656dd404319b77d287127b82894aa54c91ae482688") - version("v1.0.3", sha256="d09c3ce65cc41a5f0bed4111deaa2d0d0e37173725c4caf873fd8f312f37096e") - version("v1.0.2", sha256="50d8be2b69cf87460c69bf261cf61c64587ea5aadcfe344aec1b0a1d8b59b386") - version("v1.0.1", sha256="f244ff4de311c164597eaedf547a7305b6d3cc1e6b2bc6e6d9acb8e603a44a4b") - version("v1.0.0", sha256="c6088ba6ce73a92d165bc82e19f6670a1545fcfb6f352cdf5629c395a95c16af") + version("1.0.4", sha256="2255363aecdf53ad926002656dd404319b77d287127b82894aa54c91ae482688") + version("1.0.3", sha256="d09c3ce65cc41a5f0bed4111deaa2d0d0e37173725c4caf873fd8f312f37096e") + version("1.0.2", sha256="50d8be2b69cf87460c69bf261cf61c64587ea5aadcfe344aec1b0a1d8b59b386") + version("1.0.1", sha256="f244ff4de311c164597eaedf547a7305b6d3cc1e6b2bc6e6d9acb8e603a44a4b") + version("1.0.0", sha256="c6088ba6ce73a92d165bc82e19f6670a1545fcfb6f352cdf5629c395a95c16af") depends_on("hepmc3") depends_on("root") From 9b54ce75cffb3cf3329cf20b228bdb6a2f5aa3fe Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 5 Nov 2024 14:21:31 -0600 Subject: [PATCH 13/13] hepmcmerger: fix checksums --- packages/hepmcmerger/package.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/hepmcmerger/package.py b/packages/hepmcmerger/package.py index ce34365..0eba724 100644 --- a/packages/hepmcmerger/package.py +++ b/packages/hepmcmerger/package.py @@ -20,11 +20,11 @@ class Hepmcmerger(CMakePackage): tags = ["eic"] version("main", branch="main") - version("1.0.4", sha256="2255363aecdf53ad926002656dd404319b77d287127b82894aa54c91ae482688") - version("1.0.3", sha256="d09c3ce65cc41a5f0bed4111deaa2d0d0e37173725c4caf873fd8f312f37096e") - version("1.0.2", sha256="50d8be2b69cf87460c69bf261cf61c64587ea5aadcfe344aec1b0a1d8b59b386") - version("1.0.1", sha256="f244ff4de311c164597eaedf547a7305b6d3cc1e6b2bc6e6d9acb8e603a44a4b") - version("1.0.0", sha256="c6088ba6ce73a92d165bc82e19f6670a1545fcfb6f352cdf5629c395a95c16af") + version("1.0.4", sha256="0f5e1d6b2d76af764f5cc528ccfad1269047f6e361b6bc0a1b80941388f71437") + version("1.0.3", sha256="9f245dc46e159f9424383a4337ebbc685973e83240fe178c776e6cca5e9674f0") + version("1.0.2", sha256="e8bb639545e472f46b7de8f0c6e03c9ee61086c92b8ffcba661f0fe3b1064ad6") + version("1.0.1", sha256="419732c2d46afbad89e32362d339a643dc1e6e5ff9724c3027a45aef1b8fbf95") + version("1.0.0", sha256="5f36b0b65f1062aab79dc6653b6f6fecb9682022f1a471efa62b5614c9731618") depends_on("hepmc3") depends_on("root")