From 26a734ce66b0ece25e3387c0309f2b65ece89355 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Mon, 13 Feb 2023 07:35:41 +0000
Subject: [PATCH] feat: migrate requirements.txt to spack.yaml

---
 .gitlab-ci.yml                  |  5 ++++-
 containers/jug/dev.Dockerfile   |  2 +-
 containers/jug/requirements.txt | 18 ------------------
 spack.yaml                      | 17 +++++++++++++++++
 4 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d02672191..5e3d1a881 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,12 +11,15 @@ variables:
   ## Spack github version, e.g. v0.18.1 or commit hash
   SPACK_VERSION: "v0.19.0"
   ## Space-separated list of spack cherry-picks
-  SPACK_CHERRYPICKS: "b5ef5c2eb5145020f9de1bcb964626ce6ac2d02e 99056e03bd3e903b222e300636ec484d85d4b3fb f3f8b31be54280c6ef0b5f95ab85604aba3dff30"
+  SPACK_CHERRYPICKS: "b5ef5c2eb5145020f9de1bcb964626ce6ac2d02e 99056e03bd3e903b222e300636ec484d85d4b3fb f3f8b31be54280c6ef0b5f95ab85604aba3dff30 2f057d729da61e8c12828df44377f0a93fed820f 39a1f1462b0abf12dfaccd33f84142c852c4b56e 4b12d015e1c316b4837e02ae37e2c69a8a647180"
   ## Ref: https://github.com/spack/spack/commit/[hash]
   ## [hash]: [description]
   ## b5ef5c2eb5145020f9de1bcb964626ce6ac2d02e: geant4: version bumps for Geant4 11.1.0
   ## 99056e03bd3e903b222e300636ec484d85d4b3fb: acts: new versions 19.11.0, 21.0.0, 21.1.0
   ## f3f8b31be54280c6ef0b5f95ab85604aba3dff30: XRootD: add checksum + patch for 5.5.1 
+  ## 2f057d729da61e8c12828df44377f0a93fed820f: py-scipy: add v1.9
+  ## 39a1f1462b0abf12dfaccd33f84142c852c4b56e: SIP build system: fix "python not defined in builder"
+  ## 4b12d015e1c316b4837e02ae37e2c69a8a647180: py-jinja2-cli: new package
 
   ## EIC spack organization and repository, e.g. eic/eic-spack
   EICSPACK_ORGREPO: "eic/eic-spack"
diff --git a/containers/jug/dev.Dockerfile b/containers/jug/dev.Dockerfile
index c7eadec4f..43b8a9ae6 100644
--- a/containers/jug/dev.Dockerfile
+++ b/containers/jug/dev.Dockerfile
@@ -164,7 +164,7 @@ RUN cd /opt/spack-environment                                           \
     | xargs --no-run-if-empty                                           \
       spack buildcache create --allow-root --only package --unsigned    \
                               --mirror-name eic-spack                   \
-                              --rebuild-index                           \
+ && spack buildcache update-index --mirror-url eic-spack                \
  && spack mirror rm --scope site eic-spack                              \
     ; fi                                                                \
  && spack mirror list
diff --git a/containers/jug/requirements.txt b/containers/jug/requirements.txt
index f4cd38f8b..4d203076a 100644
--- a/containers/jug/requirements.txt
+++ b/containers/jug/requirements.txt
@@ -1,20 +1,2 @@
-awkward
-boto3
-ipython
-jinja2
-jinja2-cli
-jupyter
-jupyterlab
-lmfit
-lxml
-matplotlib
-pandas
-pycairo
 pyunfold
-pyyaml
-scipy
-seaborn
 stashcp
-uproot
-yapf
-mplhep
diff --git a/spack.yaml b/spack.yaml
index 1e936c006..f77a9da84 100644
--- a/spack.yaml
+++ b/spack.yaml
@@ -38,10 +38,27 @@ spack:
     - prmon@3.0.2 +plot
     - pythia8@8.306 +fastjet
     - python@3.10.8
+    - py-awkward@1.9.0
     - py-boto3@1.18.12
+    - py-ipython@8.5.0
+    - py-jinja2@3.1.2
+    - py-jinja2-cli@0.8.2
+    - py-jupyter@1.0.0
+    - py-jupyterlab@3.2.9
+    - py-lmfit@1.0.2
+    - py-lxml@4.9.1
+    - py-matplotlib@3.6.2
+    - py-mplhep@0.3.26
     - py-numpy@1.23.4
+    - py-pandas@1.5.1
     - py-pip@22.2.2
+    - py-pycairo@1.20.0
+    - py-pyyaml@6.0
+    - py-scipy@1.9.3
+    - py-seaborn@0.12.0
     - py-toml@0.10.2
+    - py-uproot@4.3.5
+    - py-yapf@0.30.0
     - qt@5.15.5 +opengl
     - root@6.26.06 cxxstd=17 
           +fftw +fortran +gdml +http -ipo +mlp +pythia8 
-- 
GitLab