Skip to content

Commit d37f45d

Browse files
committed
Introduce support for 32-bit builds
1 parent a1984cb commit d37f45d

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

linuxdeploy-plugin-conda.sh

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ show_usage() {
2020
echo " CONDA_PYTHON_VERSION=\"3.6\""
2121
echo " PIP_REQUIREMENTS=\"packageA packageB -r requirements.txt -e git+https://...\""
2222
echo " PIP_PREFIX=\"AppDir/usr/share/conda\""
23+
echo " ARCH=\"x86_64\" (further supported values: i686)"
2324
}
2425

2526
APPDIR=
@@ -74,12 +75,27 @@ if [ -d "$APPDIR"/usr/conda ]; then
7475
exit 1
7576
fi
7677

78+
ARCH=${ARCH:-x86_64}
79+
7780
# install Miniconda, a self contained Python distribution, into AppDir
78-
(cd "$TMPDIR" && wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh)
81+
case "$ARCH" in
82+
"x86_64")
83+
miniconda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
84+
;;
85+
"i386"|"i686")
86+
miniconda_url=https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86.sh
87+
;;
88+
*)
89+
echo "Error: Unknown Miniconda arch: $ARCH"
90+
exit 1
91+
;;
92+
esac
93+
94+
(cd "$TMPDIR" && wget "$miniconda_url")
7995

8096
# install into usr/conda/ instead of usr/ to make sure that the libraries shipped with conda don't overwrite or
8197
# interfere with libraries bundled by other plugins or linuxdeploy itself
82-
bash "$TMPDIR"/Miniconda3-latest-Linux-x86_64.sh -b -p "$APPDIR"/usr/conda -f
98+
bash "$TMPDIR"/Miniconda3-latest-Linux-*.sh -b -p "$APPDIR"/usr/conda -f
8399

84100
# activate environment
85101
. "$APPDIR"/usr/conda/bin/activate

0 commit comments

Comments
 (0)