mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 14:35:27 -04:00
Update gha-install-ncrystal.sh
This commit is contained in:
parent
3e6bb9d5f6
commit
be330a11b6
1 changed files with 4 additions and 27 deletions
|
|
@ -25,8 +25,7 @@ cmake \
|
|||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DNCRYSTAL_ENABLE_EXAMPLES=OFF \
|
||||
-DNCRYSTAL_ENABLE_SETUPSH=OFF \
|
||||
-DNCRYSTAL_ENABLE_DATA=OFF \
|
||||
-DNCRYSTAL_SKIP_PYMODINST=ON \
|
||||
-DNCRYSTAL_ENABLE_DATA=EMBED \
|
||||
-DCMAKE_INSTALL_PREFIX="${INST_DIR}" \
|
||||
-DPython3_EXECUTABLE="$PYTHON"
|
||||
|
||||
|
|
@ -36,30 +35,8 @@ make install
|
|||
#Note: There is no "make test" or "make ctest" functionality for NCrystal
|
||||
# yet. If it appears in the future, we should add it here.
|
||||
|
||||
|
||||
#The next stuff is not pretty, but it is needed as a temporary
|
||||
#workaround until NCrystal add better support for system-wide
|
||||
#installations in CMake:
|
||||
|
||||
cat <<EOF > ./findncrystallib.py
|
||||
import pathlib
|
||||
libname = pathlib.Path('./cfg_ncrystal_libname.txt').read_text().strip()
|
||||
libs = list(pathlib.Path("${INST_DIR}").glob("**/lib*/**/%s"%libname))
|
||||
assert len(libs)==1
|
||||
pathlib.Path('ncrystal_liblocation.txt').write_text(str(libs[0]))
|
||||
EOF
|
||||
|
||||
python3 ./findncrystallib.py
|
||||
|
||||
TMPNCRYSTALLIBLOCATION=$(cat ./ncrystal_liblocation.txt)
|
||||
|
||||
cat <<EOF > ./ncrystal_pypkg/NCrystal/_nclibpath.py
|
||||
#File autogenerated for working with systemwide install of NCrystal:
|
||||
import pathlib
|
||||
liblocation = pathlib.Path('${TMPNCRYSTALLIBLOCATION}'.strip())
|
||||
EOF
|
||||
|
||||
$PYTHON -m pip install ./ncrystal_pypkg/ -vv
|
||||
|
||||
eval $( "${INST_DIR}/bin/ncrystal-config --setup" )
|
||||
|
||||
# Check installation worked
|
||||
|
||||
ncrystal-config --setup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue