From c568597f92bc53b88bb65a18e8e7a3281e43342a Mon Sep 17 00:00:00 2001 From: Marc Mengel Date: Wed, 3 Apr 2024 16:51:20 -0500 Subject: [PATCH] getting FW_SEARCH_PATH FHICL_FILE_PATH and CET_PLUGIN_PATH mostly consistent with UPS packages, using setup_run_environment --- packages/art-root-io/package.py | 4 +--- packages/art/package.py | 4 +--- packages/artg4tk/package.py | 5 +++++ packages/bxdecay0/package.py | 4 +--- packages/canvas-root-io/package.py | 10 ++++------ packages/canvas/package.py | 4 ++++ packages/cetlib-except/package.py | 4 ++++ packages/cetlib/package.py | 4 +++- packages/cry/package.py | 3 +-- packages/dk2nudata/package.py | 2 +- packages/dunetpc/package.py | 4 +--- packages/fhicl-cpp/package.py | 5 ++++- packages/gallery/package.py | 8 ++++++++ packages/genie/package.py | 2 +- packages/hep-concurrency/package.py | 4 ++++ packages/icarus-signal-processing/package.py | 4 +--- packages/icarusalg/package.py | 4 +--- packages/icaruscode/package.py | 4 +--- packages/icarusutil/package.py | 2 +- packages/ifbeam/package.py | 2 +- packages/ifdh-art/package.py | 2 +- packages/ifdhc/package.py | 2 +- packages/larana/package.py | 2 +- packages/larcore/package.py | 10 +--------- packages/larcorealg/package.py | 2 +- packages/larcoreobj/package.py | 2 +- packages/lardata/package.py | 2 +- packages/lardataalg/package.py | 2 +- packages/lardataobj/package.py | 2 +- packages/lareventdisplay/package.py | 2 +- packages/larevt/package.py | 2 +- packages/larexamples/package.py | 2 +- packages/larg4/package.py | 2 +- packages/larpandora/package.py | 2 +- packages/larpandoracontent/package.py | 6 ++++++ packages/larreco/package.py | 2 +- packages/larrecodnn/package.py | 2 +- packages/larsim/package.py | 2 +- packages/larsimdnn/package.py | 2 +- packages/larsimrad/package.py | 2 +- packages/larsoft-data/package.py | 3 ++- packages/larsoft/package.py | 7 ++----- packages/larsoftobj/package.py | 2 +- packages/larvecutils/package.py | 11 +---------- packages/larwirecell/package.py | 11 +---------- packages/libevhtp/package.py | 2 +- packages/libwda/package.py | 2 +- packages/log4cpp/package.py | 2 +- packages/marley/package.py | 7 +++++++ packages/messagefacility/package.py | 4 +--- packages/nucondb/package.py | 2 +- packages/nuevdb/package.py | 12 +----------- packages/nug4/package.py | 5 ++--- packages/nugen/package.py | 5 ++--- packages/nurandom/package.py | 5 ++--- packages/nusimdata/package.py | 4 +--- packages/nutools/package.py | 4 +--- packages/pandora/package.py | 2 +- packages/pdfsets/package.py | 2 +- packages/ppfx/package.py | 7 +++++++ packages/sbncode/package.py | 4 +--- packages/sbndaq-artdaq/package.py | 4 +--- packages/sbndaq/package.py | 11 ----------- packages/sbndcode/package.py | 4 +--- packages/sbnobj/package.py | 4 +--- packages/wibtools/package.py | 2 +- packages/wirecell/package.py | 4 +--- 67 files changed, 116 insertions(+), 151 deletions(-) diff --git a/packages/art-root-io/package.py b/packages/art-root-io/package.py index 7a38b76e..bcfcd7a9 100755 --- a/packages/art-root-io/package.py +++ b/packages/art-root-io/package.py @@ -99,9 +99,7 @@ def setup_dependent_build_environment(self, env, dependent_spec): # Cleanup. sanitize_environments(env, "CET_PLUGIN_PATH") - def setup_dependent_run_environment(self, env, dependent_spec): + def setup_run_environment(self, env): prefix = self.prefix # Ensure we can find plugin libraries. env.prepend_path("CET_PLUGIN_PATH", prefix.lib) - # Cleanup. - sanitize_environments(env, "CET_PLUGIN_PATH") diff --git a/packages/art/package.py b/packages/art/package.py index e2686fd3..5a93b55d 100755 --- a/packages/art/package.py +++ b/packages/art/package.py @@ -111,11 +111,9 @@ def setup_dependent_build_environment(self, env, dependent_spec): # Cleaup. sanitize_environments(env, "CET_PLUGIN_PATH", "PERL5LIB") - def setup_dependent_run_environment(self, env, dependent_spec): + def setup_run_environment(self, env): prefix = self.prefix # Ensure we can find plugin libraries. env.prepend_path("CET_PLUGIN_PATH", prefix.lib) # Perl modules. env.prepend_path("PERL5LIB", os.path.join(prefix, "perllib")) - # Cleaup. - sanitize_environments(env, "CET_PLUGIN_PATH", "PERL5LIB") diff --git a/packages/artg4tk/package.py b/packages/artg4tk/package.py index 0de1bb39..a4ea4e73 100644 --- a/packages/artg4tk/package.py +++ b/packages/artg4tk/package.py @@ -72,3 +72,8 @@ def setup_build_environment(self, spack_env): spack_env.set("CETBUILDTOOLS_VERSION", self.spec["cetmodules"].version) spack_env.set("CETBUILDTOOLS_DIR", self.spec["cetmodules"].prefix) spack_env.set("LD_LIBRARY_PATH", self.spec["root"].prefix.lib) + + def setup_run_environment(self, run_env): + run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) + run_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) + run_env.append_path("CET_PLUGIN_PATH", self.prefix.lib) diff --git a/packages/bxdecay0/package.py b/packages/bxdecay0/package.py index 2db21f44..acd5d761 100644 --- a/packages/bxdecay0/package.py +++ b/packages/bxdecay0/package.py @@ -128,10 +128,8 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure Root can find headers for autoparsing. run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) - # Cleanup. - sanitize_environments(run_env) diff --git a/packages/canvas-root-io/package.py b/packages/canvas-root-io/package.py index be229c31..d53e8fa3 100755 --- a/packages/canvas-root-io/package.py +++ b/packages/canvas-root-io/package.py @@ -112,14 +112,12 @@ def setup_dependent_build_environment(self, env, dependent_spec): sanitize_environments(env, "CET_PLUGIN_PATH", "LD_LIBRARY_PATH", "ROOT_INCLUDE_PATH") def setup_dependent_run_environment(self, env, dependent_spec): - prefix = self.prefix - # Set LD_LIBRARY_PATH so CheckClassVersion.py can find cppyy lib - env.prepend_path("LD_LIBRARY_PATH", join_path(self.spec["root"].prefix.lib)) - env.prepend_path("LD_LIBRARY_PATH", join_path(self.spec["root"].prefix.lib,"root")) # Ensure Root can find headers for autoparsing. for d in dependent_spec.traverse( root=False, cover="nodes", order="post", deptype=("link"), direction="children" ): env.prepend_path("ROOT_INCLUDE_PATH", str(dependent_spec[d.name].prefix.include)) - # Cleanup. - sanitize_environments(env, "CET_PLUGIN_PATH", "LD_LIBRARY_PATH", "ROOT_INCLUDE_PATH") + + def setup_run_environment(self, run_env): + run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) + run_env.append_path("CET_PLUGIN_PATH", self.prefix.lib) diff --git a/packages/canvas/package.py b/packages/canvas/package.py index a05508c4..bc6cf97f 100755 --- a/packages/canvas/package.py +++ b/packages/canvas/package.py @@ -76,3 +76,7 @@ def setup_build_environment(self, env): env.prepend_path("PATH", os.path.join(prefix, "bin")) # Cleanup. sanitize_environments(env, "PATH") + + def setup_run_environment(self, run_env): + run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) + run_env.append_path("CET_PLUGIN_PATH", self.prefix.lib) diff --git a/packages/cetlib-except/package.py b/packages/cetlib-except/package.py index 8417c065..027e01ec 100644 --- a/packages/cetlib-except/package.py +++ b/packages/cetlib-except/package.py @@ -61,3 +61,7 @@ def setup_build_environment(self, env): env.prepend_path("PATH", os.path.join(self.build_directory, "bin")) # Cleanup. sanitize_environments(env, "PATH") + + def setup_run_environment(self, run_env): + run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) + run_env.append_path("CET_PLUGIN_PATH", self.prefix.lib) diff --git a/packages/cetlib/package.py b/packages/cetlib/package.py index 92b914a5..8d0adc71 100644 --- a/packages/cetlib/package.py +++ b/packages/cetlib/package.py @@ -94,9 +94,11 @@ def setup_dependent_build_environment(self, env, dependent_spec): # Cleanup. sanitize_environments(env, "PERL5LIB") - def setup_dependent_run_environment(self, env, dependent_spec): + def setup_run_environment(self, env): prefix = self.prefix + env.prepend_path("PATH", self.prefix.bin) # Perl modules. env.prepend_path("PERL5LIB", os.path.join(prefix, "perllib")) # Cleanup. sanitize_environments(env, "PERL5LIB") + env.prepend_path("CET_PLUGIN_PATH", prefix.lib ) diff --git a/packages/cry/package.py b/packages/cry/package.py index c7475dc8..4cdfce37 100644 --- a/packages/cry/package.py +++ b/packages/cry/package.py @@ -67,12 +67,11 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) spack_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.src) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.set("CRYHOME", self.prefix) run_env.set("CRY_LIB", self.prefix.lib) run_env.set("CRYDATAPATH", self.prefix.data) # Ensure we can find plugin libraries. - run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.src) @run_after("install") diff --git a/packages/dk2nudata/package.py b/packages/dk2nudata/package.py index 6561b0e5..d8d3f0e6 100644 --- a/packages/dk2nudata/package.py +++ b/packages/dk2nudata/package.py @@ -55,6 +55,6 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.set("DK2NUDATA_LIB", self.prefix.lib) spack_env.set("DK2NUDATA_INC", self.prefix.include) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) diff --git a/packages/dunetpc/package.py b/packages/dunetpc/package.py index c5311a4e..e90c29f1 100644 --- a/packages/dunetpc/package.py +++ b/packages/dunetpc/package.py @@ -120,7 +120,7 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure we can find plugin libraries. @@ -129,5 +129,3 @@ def setup_dependent_run_environment(self, run_env, dependent_spec): run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) # Perl modules. run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) - # Cleanup. - sanitize_environments(run_env) diff --git a/packages/fhicl-cpp/package.py b/packages/fhicl-cpp/package.py index e1250a63..3dadb30a 100644 --- a/packages/fhicl-cpp/package.py +++ b/packages/fhicl-cpp/package.py @@ -78,8 +78,11 @@ def setup_build_environment(self, env): sanitize_environments(env, "PATH") def setup_run_environment(self, env): - bindir = self.prefix.bin + env.prepend_path("PATH", self.prefix.bin) + env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) + env.append_path("CET_PLUGIN_PATH", self.prefix.lib) # Bash completions. + bindir = self.prefix.bin env.from_sourcing_file(os.path.join(bindir, "fhicl-dump_completions")) env.from_sourcing_file(os.path.join(bindir, "fhicl-expand_completions")) env.from_sourcing_file(os.path.join(bindir, "fhicl-get_completions")) diff --git a/packages/gallery/package.py b/packages/gallery/package.py index 608620d8..98c32706 100644 --- a/packages/gallery/package.py +++ b/packages/gallery/package.py @@ -75,3 +75,11 @@ def setup_dependent_build_environment(self, env, dependent_spec): env.prepend_path("CET_PLUGIN_PATH", prefix.lib) # Cleaup. sanitize_environments(env, "CET_PLUGIN_PATH") + + def setup_run_environment(self, run_env): + run_env.prepend_path("PATH", self.prefix.bin) + run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) + run_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) + run_env.append_path("FW_SEARCH_PATH", "{0}/fw".format(self.prefix)) + run_env.append_path("CET_PLUGIN_PATH", self.prefix.lib) + diff --git a/packages/genie/package.py b/packages/genie/package.py index 7610eab2..ad697662 100644 --- a/packages/genie/package.py +++ b/packages/genie/package.py @@ -217,7 +217,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("ROOT_INCLUDE_PATH", "{0}/GENIE".format(self.prefix.include)) spack_env.append_path("LD_LIBRARY_PATH", self.prefix.lib) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.set("GENIE", self.prefix) run_env.set("GENIE_VERSION", "v{0}".format(self.version.underscored)) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/hep-concurrency/package.py b/packages/hep-concurrency/package.py index 8bf3a198..ba85c58b 100644 --- a/packages/hep-concurrency/package.py +++ b/packages/hep-concurrency/package.py @@ -71,3 +71,7 @@ def setup_build_environment(self, env): env.prepend_path("PATH", os.path.join(prefix, "bin")) # Cleanup. sanitize_environments(env, "PATH") + + def setup_run_environment(self, run_env): + run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) + run_env.append_path("CET_PLUGIN_PATH", self.prefix.lib) diff --git a/packages/icarus-signal-processing/package.py b/packages/icarus-signal-processing/package.py index 6b272e46..9bbc6ad1 100644 --- a/packages/icarus-signal-processing/package.py +++ b/packages/icarus-signal-processing/package.py @@ -133,7 +133,7 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure we can find plugin libraries. @@ -142,5 +142,3 @@ def setup_dependent_run_environment(self, run_env, dependent_spec): run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) # Perl modules. run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) - # Cleanup. - sanitize_environments(run_env) diff --git a/packages/icarusalg/package.py b/packages/icarusalg/package.py index 81a71830..6ae49f79 100644 --- a/packages/icarusalg/package.py +++ b/packages/icarusalg/package.py @@ -197,7 +197,7 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure we can find plugin libraries. @@ -208,5 +208,3 @@ def setup_dependent_run_environment(self, run_env, dependent_spec): run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) # run_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - # Cleanup. - sanitize_environments(run_env) diff --git a/packages/icaruscode/package.py b/packages/icaruscode/package.py index d770a1eb..f68a30d9 100644 --- a/packages/icaruscode/package.py +++ b/packages/icaruscode/package.py @@ -212,7 +212,7 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure we can find plugin libraries. @@ -223,5 +223,3 @@ def setup_dependent_run_environment(self, run_env, dependent_spec): run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) # FW search path run_env.append_path("FW_SEARCH_PATH", os.path.join(self.prefix, "fw")) - # Cleanup. - sanitize_environments(run_env) diff --git a/packages/icarusutil/package.py b/packages/icarusutil/package.py index 139f7f98..b4778742 100644 --- a/packages/icarusutil/package.py +++ b/packages/icarusutil/package.py @@ -98,7 +98,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/job".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/ifbeam/package.py b/packages/ifbeam/package.py index 846789f7..3ecbea97 100644 --- a/packages/ifbeam/package.py +++ b/packages/ifbeam/package.py @@ -76,5 +76,5 @@ def setup_run_unvironment(self, run_env): def setup_dependent_build_environment(self, spack_env, dspec): spack_env.set("IFBEAM_DIR", self.prefix) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.set("IFBEAM_DIR", self.prefix) diff --git a/packages/ifdh-art/package.py b/packages/ifdh-art/package.py index 3bca6579..84a16dc5 100644 --- a/packages/ifdh-art/package.py +++ b/packages/ifdh-art/package.py @@ -91,7 +91,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) spack_env.prepend_path("PATH", self.prefix.bin) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/ifdhc/package.py b/packages/ifdhc/package.py index 268bf0ac..84ad31ce 100644 --- a/packages/ifdhc/package.py +++ b/packages/ifdhc/package.py @@ -125,7 +125,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.set("IFDHC_DIR", self.spec.prefix) spack_env.set("IFDHC_INC", self.spec.prefix.inc) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.prepend_path("PATH", self.prefix.bin) # Non-standard, therefore we have to do it ourselves. run_env.prepend_path("ROOT_INCLUDE_PATH", self.spec.prefix.inc) diff --git a/packages/larana/package.py b/packages/larana/package.py index d7b241a0..e43b4160 100644 --- a/packages/larana/package.py +++ b/packages/larana/package.py @@ -130,7 +130,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/larcore/package.py b/packages/larcore/package.py index 02b53135..9bfb5e7f 100644 --- a/packages/larcore/package.py +++ b/packages/larcore/package.py @@ -143,15 +143,7 @@ def setup_run_environment(self, run_env): # Cleaup. sanitize_environments(run_env) - def setup_dependent_build_environment(self, spack_env, dspec): - # Ensure we can find plugin libraries. - spack_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) - spack_env.prepend_path("PATH", self.prefix.bin) - spack_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) - spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) - spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/larcorealg/package.py b/packages/larcorealg/package.py index 007423ba..26e659f9 100644 --- a/packages/larcorealg/package.py +++ b/packages/larcorealg/package.py @@ -146,7 +146,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) diff --git a/packages/larcoreobj/package.py b/packages/larcoreobj/package.py index 5deaa7bd..8d1e05fa 100644 --- a/packages/larcoreobj/package.py +++ b/packages/larcoreobj/package.py @@ -151,7 +151,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) diff --git a/packages/lardata/package.py b/packages/lardata/package.py index 677784be..365cf183 100644 --- a/packages/lardata/package.py +++ b/packages/lardata/package.py @@ -164,7 +164,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/lardataalg/package.py b/packages/lardataalg/package.py index 76c26e1e..0691eccf 100644 --- a/packages/lardataalg/package.py +++ b/packages/lardataalg/package.py @@ -158,7 +158,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/lardataobj/package.py b/packages/lardataobj/package.py index 2edc0fe3..6aac9a8b 100644 --- a/packages/lardataobj/package.py +++ b/packages/lardataobj/package.py @@ -161,7 +161,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/lareventdisplay/package.py b/packages/lareventdisplay/package.py index 7d244eba..14827748 100644 --- a/packages/lareventdisplay/package.py +++ b/packages/lareventdisplay/package.py @@ -142,7 +142,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/larevt/package.py b/packages/larevt/package.py index 156e3f5d..c0ab0c29 100644 --- a/packages/larevt/package.py +++ b/packages/larevt/package.py @@ -142,7 +142,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/larexamples/package.py b/packages/larexamples/package.py index 64e20205..0550057d 100644 --- a/packages/larexamples/package.py +++ b/packages/larexamples/package.py @@ -143,7 +143,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_nvironment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/larg4/package.py b/packages/larg4/package.py index b9fc087e..720d57cb 100644 --- a/packages/larg4/package.py +++ b/packages/larg4/package.py @@ -148,7 +148,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/larpandora/package.py b/packages/larpandora/package.py index fae988dc..78dc4571 100644 --- a/packages/larpandora/package.py +++ b/packages/larpandora/package.py @@ -164,7 +164,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/fw".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/larpandoracontent/package.py b/packages/larpandoracontent/package.py index 6bd888dd..90579744 100644 --- a/packages/larpandoracontent/package.py +++ b/packages/larpandoracontent/package.py @@ -114,3 +114,9 @@ def cmake_args(self): def setup_build_environment(self, env): env.set("CETBUILDTOOLS_VERSION", "cetmodules") + + def setup_run_environment(self, run_env): + run_env.prepend_path("PATH", self.prefix.bin) + run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) + run_env.append_path("CET_PLUGIN_PATH", self.prefix.lib) + diff --git a/packages/larreco/package.py b/packages/larreco/package.py index 4622b91b..9455b0ae 100644 --- a/packages/larreco/package.py +++ b/packages/larreco/package.py @@ -171,7 +171,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FW_SEARCH_PATH", "{0}/fw".format(self.prefix)) sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/larrecodnn/package.py b/packages/larrecodnn/package.py index 8a6b7172..2ff8c416 100644 --- a/packages/larrecodnn/package.py +++ b/packages/larrecodnn/package.py @@ -185,7 +185,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) diff --git a/packages/larsim/package.py b/packages/larsim/package.py index a146496e..52246119 100644 --- a/packages/larsim/package.py +++ b/packages/larsim/package.py @@ -194,7 +194,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/fw".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/larsimdnn/package.py b/packages/larsimdnn/package.py index 823b7dc9..acee2b5f 100644 --- a/packages/larsimdnn/package.py +++ b/packages/larsimdnn/package.py @@ -136,7 +136,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/larsimrad/package.py b/packages/larsimrad/package.py index b7304dcc..52ca0508 100644 --- a/packages/larsimrad/package.py +++ b/packages/larsimrad/package.py @@ -140,7 +140,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/larsoft-data/package.py b/packages/larsoft-data/package.py index 25a4081b..4b11726c 100644 --- a/packages/larsoft-data/package.py +++ b/packages/larsoft-data/package.py @@ -34,6 +34,7 @@ def _add_paths_to_environment(self, env): "Argoneut", "Genfit", "ParticleIdentification", + "PhotonPropagation/LibraryData", os.path.join("pdf", "Gaisser"), os.path.join("pdf", "MUSUN"), "SupernovaNeutrinos", @@ -48,5 +49,5 @@ def setup_run_environment(self, run_env): def setup_dependent_build_environment(self, spack_env, dep_spec): self._add_paths_to_environment(spack_env) - def setup_dependent_run_environment(self, run_env, dep_spec): + def setup_run_environment(self, run_env): self._add_paths_to_environment(run_env) diff --git a/packages/larsoft/package.py b/packages/larsoft/package.py index 9ae56730..ddb26ab8 100644 --- a/packages/larsoft/package.py +++ b/packages/larsoft/package.py @@ -137,14 +137,11 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FW_SEARCH_PATH", "{0}/fw".format(self.prefix)) sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dspec): - run_env.prepend_path("PATH", self.prefix.bin) - run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) + def setup_run_environment(self, run_env): run_env.prepend_path("PATH", self.prefix.bin) run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) run_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) - run_env.append_path("FW_SEARCH_PATH", "{0}/fw".format(self.prefix)) - sanitize_environments(run_env) + run_env.append_path("CET_PLUGIN_PATH", self.prefix.lib) @run_after("install") def rename_bin_python(self): diff --git a/packages/larsoftobj/package.py b/packages/larsoftobj/package.py index da2af71e..554c4faf 100644 --- a/packages/larsoftobj/package.py +++ b/packages/larsoftobj/package.py @@ -120,7 +120,7 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) diff --git a/packages/larvecutils/package.py b/packages/larvecutils/package.py index dae9d81e..0e7116f8 100644 --- a/packages/larvecutils/package.py +++ b/packages/larvecutils/package.py @@ -126,18 +126,9 @@ def setup_run_environment(self, run_env): # Cleaup. sanitize_environments(run_env) - def setup_dependent_build_environment(self, spack_env, dspec): - # Ensure we can find plugin libraries. - spack_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) - spack_env.prepend_path("PATH", self.prefix.bin) - spack_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) - spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) - spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) run_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) - run_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) diff --git a/packages/larwirecell/package.py b/packages/larwirecell/package.py index 7d7dbfbf..63549642 100644 --- a/packages/larwirecell/package.py +++ b/packages/larwirecell/package.py @@ -161,18 +161,9 @@ def setup_run_environment(self, run_env): # Cleaup. sanitize_environments(run_env) - def setup_dependent_build_environment(self, spack_env, dspec): - # Ensure we can find plugin libraries. - spack_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) - spack_env.prepend_path("PATH", self.prefix.bin) - spack_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) - spack_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) - spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) run_env.append_path("FHICL_FILE_PATH", "{0}/fcl".format(self.prefix)) - run_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) diff --git a/packages/libevhtp/package.py b/packages/libevhtp/package.py index 509a48f7..6337ab4e 100644 --- a/packages/libevhtp/package.py +++ b/packages/libevhtp/package.py @@ -39,5 +39,5 @@ def cmake_args(self): def setup_dependent_build_environment(self, spack_env, dspec): spack_env.prepend_path("CMAKE_PREFIX_PATH", self.prefix) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.prepend_path("CMAKE_PREFIX_PATH", self.prefix) diff --git a/packages/libwda/package.py b/packages/libwda/package.py index 8b16254c..d17d20c5 100644 --- a/packages/libwda/package.py +++ b/packages/libwda/package.py @@ -67,5 +67,5 @@ def setup_dependent_build_environment(self, spack_env, dspec): spack_env.set("LIBWDA_LIB", self.prefix.lib) spack_env.set("LIBWDA_INC", self.prefix.include) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.set("LIBWDA_DIR", self.prefix) diff --git a/packages/log4cpp/package.py b/packages/log4cpp/package.py index b122b5f5..e71c7aae 100644 --- a/packages/log4cpp/package.py +++ b/packages/log4cpp/package.py @@ -38,5 +38,5 @@ def setup_build_environment(self, spack_env): def setup_dependent_build_environment(self, spack_env, dspec): spack_env.prepend_path("PATH", self.spec.prefix.bin) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.prepend_path("PATH", self.spec.prefix.bin) diff --git a/packages/marley/package.py b/packages/marley/package.py index 18086cd3..c08a06e4 100644 --- a/packages/marley/package.py +++ b/packages/marley/package.py @@ -51,3 +51,10 @@ def setup_run_environment(self, spack_env): def install(self, spec, prefix): with working_dir("build"): make("prefix={0}".format(prefix), "install") + + def setup_run_environment(self, run_env): + run_env.prepend_path("PATH", self.prefix.bin) + run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) + run_env.append_path("FW_SEARCH_PATH", self.prefix.share.data) + run_env.append_path("FW_SEARCH_PATH", self.prefix.share.data.react) + run_env.append_path("FW_SEARCH_PATH", self.prefix.share.data.structure) diff --git a/packages/messagefacility/package.py b/packages/messagefacility/package.py index 3166a9c8..dd817e9d 100644 --- a/packages/messagefacility/package.py +++ b/packages/messagefacility/package.py @@ -102,11 +102,9 @@ def setup_dependent_build_environment(self, env, dependent_spec): # Cleaup. sanitize_environments(env, "CET_PLUGIN_PATH", "PERL5LIB") - def setup_dependent_run_environment(self, env, dependent_spec): + def setup_run_environment(self, env): prefix = self.prefix # Ensure we can find plugin libraries. env.prepend_path("CET_PLUGIN_PATH", prefix.lib) # Perl modules. env.prepend_path("PERL5LIB", os.path.join(prefix, "perllib")) - # Cleaup. - sanitize_environments(env, "CET_PLUGIN_PATH", "PERL5LIB") diff --git a/packages/nucondb/package.py b/packages/nucondb/package.py index cf8ec132..2f78597c 100644 --- a/packages/nucondb/package.py +++ b/packages/nucondb/package.py @@ -75,5 +75,5 @@ def setup_run_environment(self, run_env): def setup_dependent_build_environment(self, spack_env, dspec): spack_env.set("NUCONDB_DIR", self.prefix) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.set("NUCONDB_DIR", self.prefix) diff --git a/packages/nuevdb/package.py b/packages/nuevdb/package.py index 9654474e..977ffbca 100644 --- a/packages/nuevdb/package.py +++ b/packages/nuevdb/package.py @@ -121,20 +121,10 @@ def setup_run_environment(self, run_env): # Cleaup. sanitize_environments(run_env) - def setup_dependent_build_environment(self, spack_env, dspec): - # Ensure we can find plugin libraries. - spack_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) - spack_env.prepend_path("PATH", self.prefix.bin) - spack_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) - spack_env.append_path("FHICL_FILE_PATH", "{0}/job".format(self.prefix)) - spack_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) - sanitize_environments(spack_env) - - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): # Ensure we can find plugin libraries. run_env.prepend_path("CET_PLUGIN_PATH", self.prefix.lib) run_env.prepend_path("PATH", self.prefix.bin) run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) run_env.append_path("FHICL_FILE_PATH", "{0}/job".format(self.prefix)) - run_env.append_path("FW_SEARCH_PATH", "{0}/gdml".format(self.prefix)) sanitize_environments(run_env) diff --git a/packages/nug4/package.py b/packages/nug4/package.py index a5b83277..79f069ee 100644 --- a/packages/nug4/package.py +++ b/packages/nug4/package.py @@ -146,7 +146,7 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure we can find plugin libraries. @@ -155,5 +155,4 @@ def setup_dependent_run_environment(self, run_env, dependent_spec): run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) # Perl modules. run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) - # Cleanup. - sanitize_environments(run_env) + run_env.prepend_path("FHICL_FILE_PATH", self.prefix.fcl) diff --git a/packages/nugen/package.py b/packages/nugen/package.py index 886d0a87..c2b21370 100644 --- a/packages/nugen/package.py +++ b/packages/nugen/package.py @@ -176,7 +176,7 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure we can find plugin libraries. @@ -185,5 +185,4 @@ def setup_dependent_run_environment(self, run_env, dependent_spec): run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) # Perl modules. run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) - # Cleanup. - sanitize_environments(run_env) + run_env.prepend_path("FHICL_FILE_PATH", self.prefix.fcl) diff --git a/packages/nurandom/package.py b/packages/nurandom/package.py index 1c3aa466..32e3ab10 100644 --- a/packages/nurandom/package.py +++ b/packages/nurandom/package.py @@ -127,7 +127,7 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure we can find plugin libraries. @@ -136,5 +136,4 @@ def setup_dependent_run_environment(self, run_env, dependent_spec): run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) # Perl modules. run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) - # Cleanup. - sanitize_environments(run_env) + run_env.prepend_path("FHICL_FILE_PATH", self.prefix.fcl) diff --git a/packages/nusimdata/package.py b/packages/nusimdata/package.py index 97288ac4..bd61d855 100644 --- a/packages/nusimdata/package.py +++ b/packages/nusimdata/package.py @@ -127,7 +127,7 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure we can find plugin libraries. @@ -136,8 +136,6 @@ def setup_dependent_run_environment(self, run_env, dependent_spec): run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) # Perl modules. run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) - # Cleanup. - sanitize_environments(run_env) # install_fhicl() is callled but there are no fcl files to install # however nusimdataConfig.cmake does a set and check on nusimdata_fcl_dir diff --git a/packages/nutools/package.py b/packages/nutools/package.py index e25c0be5..4bf6764c 100644 --- a/packages/nutools/package.py +++ b/packages/nutools/package.py @@ -147,7 +147,7 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure we can find plugin libraries. @@ -156,5 +156,3 @@ def setup_dependent_run_environment(self, run_env, dependent_spec): run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) # Perl modules. run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) - # Cleanup. - sanitize_environments(run_env) diff --git a/packages/pandora/package.py b/packages/pandora/package.py index bcdd4c4f..cb193c74 100644 --- a/packages/pandora/package.py +++ b/packages/pandora/package.py @@ -132,5 +132,5 @@ def install_modules(self): def setup_dependent_build_environment(self, spack_env, dspec): spack_env.prepend_path("CMAKE_PREFIX_PATH", "{0}/cmakemodules".format(self.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.prepend_path("CMAKE_PREFIX_PATH", "{0}/cmakemodules".format(self.prefix)) diff --git a/packages/pdfsets/package.py b/packages/pdfsets/package.py index 974539d0..e1a8dd40 100644 --- a/packages/pdfsets/package.py +++ b/packages/pdfsets/package.py @@ -96,7 +96,7 @@ def setup_run_environment(self, run_env): def setup_dependent_build_environment(self, spack_env, dspec): spack_env.set("LHAPATH", "{0}/PDFsets".format(self.spec.prefix)) - def setup_dependent_run_environment(self, run_env, dspec): + def setup_run_environment(self, run_env): run_env.set("LHAPATH", "{0}/PDFsets".format(self.spec.prefix)) def install(self, spec, prefix): diff --git a/packages/ppfx/package.py b/packages/ppfx/package.py index d85665a9..b7285705 100644 --- a/packages/ppfx/package.py +++ b/packages/ppfx/package.py @@ -83,3 +83,10 @@ def setup_build_environment(self, env): env.set("LOG4CPP_LIB", self.spec["log4cpp"].prefix) env.set("PYLIB", self.spec["pythia6"].prefix) env.set("XERCES_C_INC", self.spec["xerces-c"].prefix) + + def setup_run_environment(self, run_env): + run_env.prepend_path("PATH", self.prefix.bin) + run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) + run_env.append_path("FW_SEARCH_PATH", "{0}/fw".format(self.prefix)) + run_env.append_path("CET_PLUGIN_PATH", self.prefix.lib) + diff --git a/packages/sbncode/package.py b/packages/sbncode/package.py index 104a34a9..7e153730 100644 --- a/packages/sbncode/package.py +++ b/packages/sbncode/package.py @@ -202,7 +202,7 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure we can find plugin libraries. @@ -211,5 +211,3 @@ def setup_dependent_run_environment(self, run_env, dependent_spec): run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) # Perl modules. run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) - # Cleanup. - sanitize_environments(run_env) diff --git a/packages/sbndaq-artdaq/package.py b/packages/sbndaq-artdaq/package.py index 64924a8d..f0865ea2 100644 --- a/packages/sbndaq-artdaq/package.py +++ b/packages/sbndaq-artdaq/package.py @@ -92,12 +92,10 @@ def setup_run_environment(self, env): # Cleaup. sanitize_environments(env, "CET_PLUGIN_PATH", "FHICL_FILE_PATH") - def setup_dependent_run_environment(self, env, dependent_spec): + def setup_run_environment(self, env): prefix = self.prefix # Ensure we can find plugin libraries. env.prepend_path("CET_PLUGIN_PATH", prefix.lib) # Ensure we can find fhicl files env.prepend_path("FHICL_FILE_PATH", prefix + "/fcl") - # Cleaup. - sanitize_environments(env, "CET_PLUGIN_PATH", "FHICL_FILE_PATH") diff --git a/packages/sbndaq/package.py b/packages/sbndaq/package.py index 10753970..7c38bb1d 100644 --- a/packages/sbndaq/package.py +++ b/packages/sbndaq/package.py @@ -75,14 +75,3 @@ def setup_run_environment(self, env): env.prepend_path("CET_PLUGIN_PATH", prefix.lib) # Ensure we can find fhicl files env.prepend_path("FHICL_FILE_PATH", prefix + "/fcl") - # Cleaup. - sanitize_environments(env, "CET_PLUGIN_PATH", "FHICL_FILE_PATH") - - def setup_dependent_run_environment(self, env, dependent_spec): - prefix = self.prefix - # Ensure we can find plugin libraries. - env.prepend_path("CET_PLUGIN_PATH", prefix.lib) - # Ensure we can find fhicl files - env.prepend_path("FHICL_FILE_PATH", prefix + "/fcl") - # Cleaup. - sanitize_environments(env, "CET_PLUGIN_PATH", "FHICL_FILE_PATH") diff --git a/packages/sbndcode/package.py b/packages/sbndcode/package.py index 7643a1e5..cf7c17da 100644 --- a/packages/sbndcode/package.py +++ b/packages/sbndcode/package.py @@ -166,7 +166,7 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure we can find plugin libraries. @@ -175,5 +175,3 @@ def setup_dependent_run_environment(self, run_env, dependent_spec): run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) # Perl modules. run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) - # Cleanup. - sanitize_environments(run_env) diff --git a/packages/sbnobj/package.py b/packages/sbnobj/package.py index b98733c1..13e8e8a3 100644 --- a/packages/sbnobj/package.py +++ b/packages/sbnobj/package.py @@ -180,7 +180,7 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): # Binaries. run_env.prepend_path("PATH", self.prefix.bin) # Ensure we can find plugin libraries. @@ -189,5 +189,3 @@ def setup_dependent_run_environment(self, run_env, dependent_spec): run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) # Perl modules. run_env.prepend_path("PERL5LIB", os.path.join(self.prefix, "perllib")) - # Cleanup. - sanitize_environments(run_env) diff --git a/packages/wibtools/package.py b/packages/wibtools/package.py index 842aa518..06b0f654 100644 --- a/packages/wibtools/package.py +++ b/packages/wibtools/package.py @@ -91,7 +91,7 @@ def setup_run_environment(self, env): env.set("WIB_ADDRESS_TABLE_PATH", prefix + "/tables") env.set("EIB_CONFIG_PATH", prefix + "/config") - def setup_dependent_run_environment(self, env, dependent_spec): + def setup_run_environment(self, env): prefix = self.prefix env.set("WIBTOOLS_BIN", prefix.bin) env.set("WIB_ADDRESS_TABLE_PATH", prefix + "/tables") diff --git a/packages/wirecell/package.py b/packages/wirecell/package.py index f56ecc3d..77c6a236 100644 --- a/packages/wirecell/package.py +++ b/packages/wirecell/package.py @@ -140,10 +140,8 @@ def setup_dependent_build_environment(self, spack_env, dependent_spec): # Cleanup. sanitize_environments(spack_env) - def setup_dependent_run_environment(self, run_env, dependent_spec): + def setup_run_environment(self, run_env): run_env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) - # Cleanup. - sanitize_environments(run_env) def flag_handler(self, name, flags): if name == "cxxflags" and self.spec.compiler.name == "gcc":