@@ -63,7 +63,7 @@ export BIGLINK="$ROOT_PATH/src/tools/biglink"
63
63
export PIP=$PIP_NAME
64
64
export VIRTUALENV=$VIRTUALENV_NAME
65
65
66
- export JELLYBEAN =0
66
+ export COPYLIBS =0
67
67
68
68
MD5SUM=$( which md5sum)
69
69
if [ " X$MD5SUM " == " X" ]; then
@@ -221,10 +221,6 @@ function push_arm() {
221
221
export MAKE=" make -j5"
222
222
export READELF=" $TOOLCHAIN_PREFIX -readelf"
223
223
224
- # if [ "$JELLYBEAN" == "1" ]; then
225
- # export LIBLINK="$CC -shared $LDFLAGS"
226
- # fi
227
-
228
224
# Use ccache ?
229
225
which ccache & > /dev/null
230
226
if [ $? -eq 0 ]; then
@@ -255,12 +251,15 @@ function usage() {
255
251
echo
256
252
echo " -d directory Name of the distribution directory"
257
253
echo " -h Show this help"
258
- echo " -j Create distribution for JB 4.3+"
259
254
echo " -l Show a list of available modules"
260
255
echo " -m 'mod1 mod2' Modules to include"
261
256
echo " -f Restart from scratch (remove the current build)"
262
257
echo " -x display expanded values (execute 'set -x')"
263
258
echo
259
+ echo " Advanced:"
260
+ echo " -L Copy libraries instead of using biglink"
261
+ echo " (may not work before Android 4.3)"
262
+ echo
264
263
echo " For developers:"
265
264
echo " -u 'mod1 mod2' Modules to update (if already compiled)"
266
265
echo
@@ -353,8 +352,13 @@ function run_prepare() {
353
352
fi
354
353
done
355
354
356
- if [ " $JELLYBEAN " == " 1" ]; then
357
- info " Distribution for Jelly Bean (4.3) or higher; biglink will be skipped"
355
+ if [ " $COPYLIBS " == " 1" ]; then
356
+ info " Library files will be copied to the distribution (no biglink)"
357
+ error " NOTICE: This option is still beta!"
358
+ error " \tIf you encounter an error 'Failed to locate needed libraries!' and"
359
+ error " \tthe libraries listed are not supposed to be provided by your app or"
360
+ error " \tits dependencies, please submit a bug report at"
361
+ error " \thttps://github.com/kivy/python-for-android/issues"
358
362
fi
359
363
360
364
info " Distribution will be located at $DIST_PATH "
@@ -773,8 +777,10 @@ function run_distribute() {
773
777
try cp -a python-install/lib private/
774
778
try mkdir -p private/include/python2.7
775
779
776
- if [ " $JELLYBEAN " == " 1" ]; then
777
- try sh -c " cat libs/$ARCH /copylibs | xargs -d'\n' cp -t private/"
780
+ if [ " $COPYLIBS " == " 1" ]; then
781
+ if [ -s " libs/$ARCH /copylibs" ]; then
782
+ try sh -c " cat libs/$ARCH /copylibs | xargs -d'\n' cp -t private/"
783
+ fi
778
784
else
779
785
try mv libs/$ARCH /libpymodules.so private/
780
786
fi
@@ -804,7 +810,7 @@ function run_distribute() {
804
810
805
811
function run_biglink() {
806
812
push_arm
807
- if [ " $JELLYBEAN " == " 0" ]; then
813
+ if [ " $COPYLIBS " == " 0" ]; then
808
814
try $BIGLINK $LIBS_PATH /libpymodules.so $LIBLINK_PATH
809
815
else
810
816
try $BIGLINK $LIBS_PATH /copylibs $LIBLINK_PATH
@@ -850,13 +856,13 @@ function arm_deduplicate() {
850
856
851
857
852
858
# Do the build
853
- while getopts " :hjvlfxm :u:d:s" opt; do
859
+ while getopts " :hCvlfxm :u:d:s" opt; do
854
860
case $opt in
855
861
h)
856
862
usage
857
863
;;
858
- j )
859
- JELLYBEAN =1
864
+ C )
865
+ COPYLIBS =1
860
866
LIBLINK=${LIBLINK} -jb
861
867
BIGLINK=${BIGLINK} -jb
862
868
;;
0 commit comments