Skip to content

Commit 7f9d03e

Browse files
committed
bootstrap: make distribute aware of the bootstrap selection, defaults to legacy. We can switch with "-b BOOSTRAP_NAME"
1 parent 8153369 commit 7f9d03e

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

distribute.sh

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
# Modules
1010
MODULES=
11+
BOOTSTRAP="legacy"
1112

1213
# Resolve Python path
1314
PYTHON="$(which python2.7)"
@@ -49,12 +50,13 @@ BUILD_PATH="$ROOT_PATH/build"
4950
LIBS_PATH="$ROOT_PATH/build/libs"
5051
JAVACLASS_PATH="$ROOT_PATH/build/java"
5152
PACKAGES_PATH="${PACKAGES_PATH:-$ROOT_PATH/.packages}"
52-
SRC_PATH="$ROOT_PATH/src"
53-
JNI_PATH="$SRC_PATH/jni"
5453
DIST_PATH="$ROOT_PATH/dist/default"
5554
SITEPACKAGES_PATH="$BUILD_PATH/python-install/lib/python2.7/site-packages/"
5655
HOSTPYTHON="$BUILD_PATH/python-install/bin/python.host"
5756
CYTHON="cython -t"
57+
BOOTSTRAP_PATH="$ROOT_PATH/bootstrap"
58+
#SRC_PATH="$ROOT_PATH/src"
59+
#JNI_PATH="$SRC_PATH/jni"
5860

5961
# Tools
6062
export LIBLINK_PATH="$BUILD_PATH/objects"
@@ -212,7 +214,7 @@ function push_arm() {
212214

213215
export CC="$TOOLCHAIN_PREFIX-gcc $CFLAGS"
214216
export CXX="$TOOLCHAIN_PREFIX-g++ $CXXFLAGS"
215-
export AR="$TOOLCHAIN_PREFIX-ar"
217+
export AR="$TOOLCHAIN_PREFIX-ar"
216218
export RANLIB="$TOOLCHAIN_PREFIX-ranlib"
217219
export LD="$TOOLCHAIN_PREFIX-ld"
218220
export STRIP="$TOOLCHAIN_PREFIX-strip --strip-unneeded"
@@ -243,7 +245,7 @@ function pop_arm() {
243245

244246
function usage() {
245247
echo "Python for android - distribute.sh"
246-
echo
248+
echo
247249
echo "Usage: ./distribute.sh [options]"
248250
echo
249251
echo " -d directory Name of the distribution directory"
@@ -354,6 +356,10 @@ function run_prepare() {
354356
fi
355357
try mkdir -p "$DIST_PATH"
356358

359+
info "Boostrap used: $BOOTSTRAP"
360+
export SRC_PATH="$BOOTSTRAP_PATH/$BOOTSTRAP"
361+
export JNI_PATH="$BOOTSTRAP_PATH/$BOOTSTRAP/jni"
362+
357363
if [ $DO_CLEAN_BUILD -eq 1 ]; then
358364
info "Cleaning build"
359365
try rm -rf $BUILD_PATH
@@ -712,7 +718,7 @@ function run_pymodules_install() {
712718
exit -1
713719
fi
714720
done
715-
721+
716722
debug "Check if virtualenv is existing"
717723
if [ ! -d venv ]; then
718724
debug "Installing virtualenv"
@@ -829,7 +835,7 @@ function arm_deduplicate() {
829835

830836

831837
# Do the build
832-
while getopts ":hvlfxm:u:d:s" opt; do
838+
while getopts ":hvlfxm:u:d:b:s" opt; do
833839
case $opt in
834840
h)
835841
usage
@@ -860,6 +866,9 @@ while getopts ":hvlfxm:u:d:s" opt; do
860866
x)
861867
DO_SET_X=1
862868
;;
869+
b)
870+
BOOTSTRAP="$OPTARG"
871+
;;
863872
\?)
864873
echo "Invalid option: -$OPTARG" >&2
865874
exit 1

0 commit comments

Comments
 (0)