Skip to content

Commit 6917715

Browse files
committed
Look for JDK in PREFIX
1 parent ed7939b commit 6917715

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

dev/conda/osx-64/build.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,36 @@ DEV_CONDA=$( cd $RECIPE_DIR/.. ; /bin/pwd -P )
1010
(
1111
set -eu
1212

13-
# Find Java bin directory
14-
echo CONDA_EXE=$CONDA_EXE
15-
CONDA=$( dirname $( dirname $CONDA_EXE ) )
16-
# OpenJDK home should be under MINICONDA/pkgs/openjdk-*
17-
# Should be in MINICONDA/bin but is not on any system
18-
# On Linux it is under $CONDA/pkgs/openjdk-*/lib/jvm/bin
19-
# On GitHub macos-13 it is under $CONDA/lib/jvm/bin
20-
echo FIND JAVA
13+
# Find Java bin directory in Conda PREFIX sandbox
14+
# echo CONDA_EXE=$CONDA_EXE
15+
# CONDA=$( dirname $( dirname $CONDA_EXE ) )
16+
# OpenJDK home should be under PREFIX/pkgs/openjdk-*
17+
# Should be in PREFIX/bin but is not on any system
18+
# On Linux it is under $PREFIX/pkgs/openjdk-*/lib/jvm/bin
19+
# On GitHub macos-13 it is under $PREFIX/lib/jvm/bin
20+
echo FIND JAVA PREFIX $PREFIX
2121
which java javac || true
2222
conda list
23-
source $CONDA/etc/profile.d/conda.sh
23+
source $PREFIX/etc/profile.d/conda.sh
2424
which java javac || true
2525
echo $PATH
2626
set -x
2727
FOUND_JDK=0
28-
find $CONDA -name java
29-
JDKS=( $( find $CONDA/pkgs -type d -name "openjdk-*" ) )
28+
find $PREFIX -name java
29+
JDKS=( $( find $PREFIX/pkgs -type d -name "openjdk-*" ) )
3030
if (( ${#JDKS} > 0 ))
3131
then
3232
JDK_BIN=${JDKS[0]}/lib/jvm/bin
3333
if ! [[ -d $JDK_BIN ]]
3434
then
35-
echo "build.sh: Broken JVM directory structure in $CONDA"
35+
echo "build.sh: Broken JVM directory structure in $PREFIX"
3636
exit 1
3737
fi
3838
FOUND_JDK=1
3939
fi
40-
if [[ -d $CONDA/lib/jvm/bin ]]
40+
if [[ -d $PREFIX/lib/jvm/bin ]]
4141
then
42-
JDK_BIN=$CONDA/lib/jvm/bin
42+
JDK_BIN=$PREFIX/lib/jvm/bin
4343
FOUND_JDK=1
4444
fi
4545
if (( ! FOUND_JDK ))

0 commit comments

Comments
 (0)