Commit 5cf97ad6 authored by Duncan Macleod's avatar Duncan Macleod
Browse files

conda: move activate scripts into lib packages

since either those hold the data files anyway, or are absolutely required by the packages that do
[skip rhel][skip debian][skip integration][skip docs][skip wheels]
parent a19ece34
......@@ -11,27 +11,3 @@ make -j ${CPU_COUNT} V=1 VERBOSE=1 install -C bin
# install system configuration files
make -j ${CPU_COUNT} V=1 VERBOSE=1 install-sysconfDATA
# -- create activate/deactivate scripts
PKG_NAME_UPPER=$(echo ${PKG_NAME} | awk '{ print toupper($0) }')
# activate.sh
ACTIVATE_SH="${PREFIX}/etc/conda/activate.d/activate_${PKG_NAME}.sh"
mkdir -p $(dirname ${ACTIVATE_SH})
cat > ${ACTIVATE_SH} << EOF
#!/bin/bash
export CONDA_BACKUP_${PKG_NAME_UPPER}_DATADIR="\${${PKG_NAME_UPPER}_DATADIR:-empty}"
export ${PKG_NAME_UPPER}_DATADIR="/opt/anaconda1anaconda2anaconda3/share/${PKG_NAME}"
EOF
# deactivate.sh
DEACTIVATE_SH="${PREFIX}/etc/conda/deactivate.d/deactivate_${PKG_NAME}.sh"
mkdir -p $(dirname ${DEACTIVATE_SH})
cat > ${DEACTIVATE_SH} << EOF
#!/bin/bash
if [ "\${CONDA_BACKUP_${PKG_NAME_UPPER}_DATADIR}" = "empty" ]; then
unset ${PKG_NAME_UPPER}_DATADIR
else
export ${PKG_NAME_UPPER}_DATADIR="\${CONDA_BACKUP_${PKG_NAME_UPPER}_DATADIR}"
fi
unset CONDA_BACKUP_${PKG_NAME_UPPER}_DATADIR
EOF
......@@ -12,3 +12,30 @@ make -j ${CPU_COUNT} V=1 VERBOSE=1 -C swig install-data
# install pkg-config
make -j ${CPU_COUNT} V=1 VERBOSE=1 install-pkgconfigDATA
# -- create activate/deactivate scripts
# strip out the 'lib' package name prefix
LALSUITE_NAME=${PKG_NAME#"lib"}
LALSUITE_NAME_UPPER=$(echo ${LALSUITE_NAME} | awk '{ print toupper($0) }')
# activate.sh
ACTIVATE_SH="${PREFIX}/etc/conda/activate.d/activate_${PKG_NAME}.sh"
mkdir -p $(dirname ${ACTIVATE_SH})
cat > ${ACTIVATE_SH} << EOF
#!/bin/bash
export CONDA_BACKUP_${LALSUITE_NAME_UPPER}_DATADIR="\${${LALSUITE_NAME_UPPER}_DATADIR:-empty}"
export ${LALSUITE_NAME_UPPER}_DATADIR="/opt/anaconda1anaconda2anaconda3/share/${LALSUITE_NAME}"
EOF
# deactivate.sh
DEACTIVATE_SH="${PREFIX}/etc/conda/deactivate.d/deactivate_${PKG_NAME}.sh"
mkdir -p $(dirname ${DEACTIVATE_SH})
cat > ${DEACTIVATE_SH} << EOF
#!/bin/bash
if [ "\${CONDA_BACKUP_${LALSUITE_NAME_UPPER}_DATADIR}" = "empty" ]; then
unset ${LALSUITE_NAME_UPPER}_DATADIR
else
export ${LALSUITE_NAME_UPPER}_DATADIR="\${CONDA_BACKUP_${LALSUITE_NAME_UPPER}_DATADIR}"
fi
unset CONDA_BACKUP_${LALSUITE_NAME_UPPER}_DATADIR
EOF
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment