Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Commit

Permalink
Avoid perl path from build machine appearing in wheel / binary distri…
Browse files Browse the repository at this point in the history
…butions (#800)

In case of wheel, neuron wrapper scripts will set `CORENRN_PERLEXE` variable
pointing to perl binary to use. Prefer that over `PERL_EXECUTABLE` found by CMake

Fixes #799
  • Loading branch information
pramodk authored Apr 20, 2022
1 parent df95cea commit 36a6277
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion extra/nrnivmodl-core.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ APP_NAME=$(basename $0)

# directory and parent directory of this script
PARENT_DIR="$(dirname $BASH_SOURCE)/.."
ROOT_DIR=$(@PERL_EXECUTABLE@ -e "use Cwd 'abs_path'; print abs_path('$PARENT_DIR')")

# prefer perl exe set by neuron wrappers in case of wheel
PERL_EXE=${CORENRN_PERLEXE:-@PERL_EXECUTABLE@}
# in case of mac installer, wrapper is not used and hence
# check if binary exist. otherwise, just rely on perl being
# in default $PATH
if [ ! -f "${PERL_EXE}" ]; then PERL_EXE=$(which perl); fi

ROOT_DIR=$(${PERL_EXE} -e "use Cwd 'abs_path'; print abs_path('$PARENT_DIR')")

# default arguments : number of parallel builds and default mod file path
PARALLEL_BUILDS=4
Expand Down

0 comments on commit 36a6277

Please sign in to comment.