From d7d0026e3a0a98123179e0da52eb65d479f38fc8 Mon Sep 17 00:00:00 2001 From: Shimoda Date: Tue, 9 Jan 2018 03:10:32 +0900 Subject: [PATCH] fix dlopen errors by C extension modules, **this is release** . close #143 #144 append "-lpython3.6m" option to ldflags: kivy/python-for-android@ed1e1a8 - can't resolve with sys.setdlopenflags(os.RTLD_LAZY or GLOBAL) - can't resolve with including libpython3.6m.so into release.zip - can't resolve with workaround distutils.sysconfig.EXT_SUFFIX in setup.py - can't resolve with old paching to _sysconfigdata's EXT_SUFFIX. --- .../patches/python-3.6.0-python-Makefile.pre.in.patch | 10 +++++++++- tools/localinstall.sh | 11 +++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/python3-alpha/patches/python-3.6.0-python-Makefile.pre.in.patch b/python3-alpha/patches/python-3.6.0-python-Makefile.pre.in.patch index 2e1ccefa..bc0565ae 100644 --- a/python3-alpha/patches/python-3.6.0-python-Makefile.pre.in.patch +++ b/python3-alpha/patches/python-3.6.0-python-Makefile.pre.in.patch @@ -1,6 +1,6 @@ diff -ur host-src/Makefile.pre.in python-src_arm/Makefile.pre.in --- host-src/Makefile.pre.in 2016-12-23 11:21:21.000000000 +0900 -+++ python-src_arm/Makefile.pre.in 2017-01-20 07:29:33.327508353 +0900 ++++ python-src_arm/Makefile.pre.in 2018-01-09 02:48:42.884307702 +0900 @@ -142,7 +142,7 @@ # Symbols used for using shared libraries @@ -22,6 +22,14 @@ diff -ur host-src/Makefile.pre.in python-src_arm/Makefile.pre.in # Tcl and Tk config info from --with-tcltk-includes and -libs options TCLTK_INCLUDES= @TCLTK_INCLUDES@ +@@ -575,6 +586,7 @@ + esac; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ ++ LDFLAGS='-lpython3.6m' \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + + @@ -1431,6 +1436,7 @@ # Install the dynamically loadable modules # This goes into $(exec_prefix) diff --git a/tools/localinstall.sh b/tools/localinstall.sh index 25e46b94..c701391c 100755 --- a/tools/localinstall.sh +++ b/tools/localinstall.sh @@ -14,14 +14,21 @@ EOF sdext=/sdcard # fix to fit your devcie. zip_bin=python${_2or3}_$(cat LATEST_VERSION)$arch.zip zip_ext=python${_2or3}_extras_$(cat LATEST_VERSION_EXTRA).zip +zip_scr=python${_2or3}_scripts_$(cat LATEST_VERSION_SCRIPTS).zip pkg=com.googlecode.python${_2or3}forandroid path_inst=$sd/$pkg path_app=/data/data/$pkg/files +$adb shell mkdir -p $path_inst $adb push $zip_bin $path_inst $adb push $zip_ext $path_inst -for i in python-scripts/*.py; do - $adb push $i $sd/sl4a/scripts; done +$adb push $zip_scr $path_inst +# for i in python-scripts/*.py; do +# $adb push $i $sd/sl4a/scripts; done + +echo pkg: $pkg +echo path_app: $path_app +echo path_inst: $path_inst # you need root permission with it if [ x$nosu = x ]; then $adb shell "su -c \"cd $path_app; rm -r python; unzip -o $path_inst/$zip_bin\""