Skip to content

Commit

Permalink
fix dlopen errors by C extension modules, **this is release** . close #…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
Shimoda committed Jan 8, 2018
1 parent 03492cd commit d7d0026
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
10 changes: 9 additions & 1 deletion python3-alpha/patches/python-3.6.0-python-Makefile.pre.in.patch
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand Down
11 changes: 9 additions & 2 deletions tools/localinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
Expand Down

0 comments on commit d7d0026

Please sign in to comment.