Skip to content

Commit f4e8ed0

Browse files
committed
Clean up build-env for plugins, add h5py for pv-python
1 parent 7de06e4 commit f4e8ed0

File tree

4 files changed

+48
-7
lines changed

4 files changed

+48
-7
lines changed

recipes/paraview/5.13.1/gh200/environments.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ paraview-gh200-egl-cuda:
1111
link: run
1212
exclude: []
1313
uenv:
14+
add_compilers: true
1415
prefix_paths:
1516
LD_LIBRARY_PATH: [lib, lib64]
1617

recipes/paraview/5.13.1/gh200/post-install

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ python3 $HOME/store/meta/recipe/scripts/env-to-package.py -f $HOME/store/meta/re
4949

5050
# =====================================
5151
debug_output "create build-env"
52-
BUILD_ENV=$mount_path/paraview-buildenv.rc
52+
BUILD_ENV_DEV=$mount_path/paraview-buildenv-dev.rc
5353
SPEC="$SPACK_ENV_NAME %gcc@12 ^[virtuals=gl] egl"
5454
$SPACK_CMD -e $HOME/environments/$SPACK_ENV_NAME/ env activate --sh
5555
$SPACK_CMD -e $HOME/environments/$SPACK_ENV_NAME/ add $SPEC
5656
$SPACK_CMD -e $HOME/environments/$SPACK_ENV_NAME/ concretize
57-
$SPACK_CMD -e $HOME/environments/$SPACK_ENV_NAME/ build-env --dump $BUILD_ENV "$SPEC"
57+
$SPACK_CMD -e $HOME/environments/$SPACK_ENV_NAME/ build-env --dump $BUILD_ENV_DEV "$SPEC"
5858

5959
# =====================================
6060
debug_output "source build-env"
61-
source $BUILD_ENV
61+
source $BUILD_ENV_DEV
6262

6363
# =====================================
6464
debug_output "checkout paraview/vtk/vtkm branches"
@@ -181,6 +181,25 @@ ninja
181181
ninja install
182182
ninja clean
183183

184+
# =====================================
185+
debug_output "cleanup user build environemnt"
186+
# make a copy of the dev build-env and remove the /dev/shm version
187+
BUILD_ENV=$PARAVIEW_INSTALL_DIR/buildenv.rc
188+
cp $BUILD_ENV_DEV $BUILD_ENV
189+
rm $BUILD_ENV_DEV
190+
# add paraview path to build env
191+
sed -i "s|^CMAKE_PREFIX_PATH=|CMAKE_PREFIX_PATH=$PARAVIEW_INSTALL_DIR:|g" $BUILD_ENV
192+
193+
# remove /dev/shm paths from build-env that will not be available to the final user
194+
GCCLOC=$($SPACK_CMD location -i gcc@12)
195+
sed -i "s|/dev/shm/biddisco/spack/lib/spack/env/gcc|$GCCLOC/bin|g" $BUILD_ENV
196+
sed -i "s|/dev/shm/biddisco/spack/bin|\$PATH|" $BUILD_ENV
197+
198+
sed -i "/^HOME=/d" $BUILD_ENV
199+
sed -i "/^SPACK_ROOT=/d" $BUILD_ENV
200+
sed -i "/^SPACK_SYSTEM_CONFIG_PATH=/d" $BUILD_ENV
201+
sed -i "/^SPACK_USER_CACHE_PATH=/d" $BUILD_ENV
202+
184203
# =====================================
185204
debug_output "set permissions"
186205
chmod -R a+r $BUILD_ENV

recipes/paraview/5.13.1/zen2/environments.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ paraview-zen2-osmesa:
1111
link: run
1212
exclude: []
1313
uenv:
14+
add_compilers: true
1415
prefix_paths:
1516
LD_LIBRARY_PATH: [lib, lib64]
1617

@@ -129,6 +130,7 @@ paraview-python:
129130
link: run
130131
exclude: []
131132
uenv:
133+
add_compilers: true
132134
prefix_paths:
133135
LD_LIBRARY_PATH: [lib, lib64]
134136

@@ -139,4 +141,4 @@ paraview-python:
139141
- py-matplotlib
140142
- py-mpi4py
141143
- py-cftime
142-
- py-h5py
144+
- py-h5py

recipes/paraview/5.13.1/zen2/post-install

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ python3 $HOME/store/meta/recipe/scripts/env-to-package.py -f $HOME/store/meta/re
4949

5050
# =====================================
5151
debug_output "create build-env"
52-
BUILD_ENV=$mount_path/paraview-buildenv.rc
52+
BUILD_ENV_DEV=$mount_path/paraview-buildenv-dev.rc
5353
SPEC="$SPACK_ENV_NAME %gcc@12 ^[virtuals=gl] osmesa ^mesa +osmesa"
5454
$SPACK_CMD -e $HOME/environments/$SPACK_ENV_NAME/ env activate --sh
5555
$SPACK_CMD -e $HOME/environments/$SPACK_ENV_NAME/ add $SPEC
5656
$SPACK_CMD -e $HOME/environments/$SPACK_ENV_NAME/ concretize
57-
$SPACK_CMD -e $HOME/environments/$SPACK_ENV_NAME/ build-env --dump $BUILD_ENV "$SPEC"
57+
$SPACK_CMD -e $HOME/environments/$SPACK_ENV_NAME/ build-env --dump $BUILD_ENV_DEV "$SPEC"
5858

5959
# =====================================
6060
debug_output "source build-env"
61-
source $BUILD_ENV
61+
source $BUILD_ENV_DEV
6262

6363
# =====================================
6464
debug_output "checkout paraview/vtk/vtkm branches"
@@ -180,6 +180,25 @@ ninja
180180
ninja install
181181
ninja clean
182182

183+
# =====================================
184+
debug_output "cleanup user build environemnt"
185+
# make a copy of the dev build-env and remove the /dev/shm version
186+
BUILD_ENV=$PARAVIEW_INSTALL_DIR/buildenv.rc
187+
cp $BUILD_ENV_DEV $BUILD_ENV
188+
rm $BUILD_ENV_DEV
189+
# add paraview path to build env
190+
sed -i "s|^CMAKE_PREFIX_PATH=|CMAKE_PREFIX_PATH=$PARAVIEW_INSTALL_DIR:|g" $BUILD_ENV
191+
192+
# remove /dev/shm paths from build-env that will not be available to the final user
193+
GCCLOC=$($SPACK_CMD location -i gcc@12)
194+
sed -i "s|/dev/shm/biddisco/spack/lib/spack/env/gcc|$GCCLOC/bin|g" $BUILD_ENV
195+
sed -i "s|/dev/shm/biddisco/spack/bin|\$PATH|" $BUILD_ENV
196+
197+
sed -i "/^HOME=/d" $BUILD_ENV
198+
sed -i "/^SPACK_ROOT=/d" $BUILD_ENV
199+
sed -i "/^SPACK_SYSTEM_CONFIG_PATH=/d" $BUILD_ENV
200+
sed -i "/^SPACK_USER_CACHE_PATH=/d" $BUILD_ENV
201+
183202
# =====================================
184203
debug_output "set permissions"
185204
chmod -R a+r $BUILD_ENV

0 commit comments

Comments
 (0)