Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Package Directory Setting #87

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ export LIBRARY_PATH=${PREFIX}/lib
export CMAKE_PREFIX_PATH=${PREFIX}
export PATH="${PREFIX}/bin:${PATH}"

#set JULIA_DEPOT_PATH in conda env
export JULIA_DEPOT_PATH="${PREFIX}/share/julia/site:$JULIA_DEPOT_PATH"

# Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d.
# This will allow them to be run on environment activation.
for CHANGE in "activate" "deactivate"
do
mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d"
cp "${RECIPE_DIR}/scripts/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh"
done
# Hack to suppress building docs
cat > doc/Makefile << EOF
html :
Expand Down Expand Up @@ -55,6 +65,3 @@ make -j 4 prefix=${PREFIX} MARCH=core2 sysconfigdir=${PREFIX}/etc \
TAGGED_RELEASE_BANNER="conda-forge-julia release" \
CC=$CC CXX=$CXX FC=$FC \
install

# Configure juliarc to use conda environment
cat "${RECIPE_DIR}/juliarc.jl" >> "${PREFIX}/etc/julia/juliarc.jl"
4 changes: 4 additions & 0 deletions recipe/scripts/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export JULIA_DEPOT_PATH_BACKUP=${JULIA_DEPOT_PATH:-}
export JULIA_PROJECT_BACKUP=${JULIA_PROJECT:-}
export JULIA_DEPOT_PATH="$CONDA_PREFIX/share/julia/site:$JULIA_DEPOT_PATH"
export JULIA_PROJECT="$CONDA_PREFIX/share/julia/site/environments/$CONDA_DEFAULT_ENV"
11 changes: 11 additions & 0 deletions recipe/scripts/deactivate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export JULIA_DEPOT_PATH=$JULIA_DEPOT_PATH_BACKUP
export JULIA_PROJECT=$JULIA_PROJECT_BACKUP
unset JULIA_DEPOT_PATH_BACKUP
unset JULIA_PROJECT_BACKUP

if [ -z $JULIA_DEPOT_PATH ]; then
unset JULIA_DEPOT_PATH
fi
if [ -z $JULIA_PROJECT ]; then
unset JULIA_PROJECT
fi