diff --git a/p4a/pythonforandroid/recipe.py b/p4a/pythonforandroid/recipe.py index b7556db..071aa22 100644 --- a/p4a/pythonforandroid/recipe.py +++ b/p4a/pythonforandroid/recipe.py @@ -658,8 +658,8 @@ class BootstrapNDKRecipe(Recipe): env['PYTHON_LINK_ROOT'] = self.ctx.python_recipe.link_root(arch.arch) env['EXTRA_LDLIBS'] = ' -lpython{}'.format( self.ctx.python_recipe.major_minor_version_string) - if 'python3' in self.ctx.python_recipe.name: - env['EXTRA_LDLIBS'] += 'm' + #if 'python3' in self.ctx.python_recipe.name: + # env['EXTRA_LDLIBS'] += 'm' return env @@ -803,7 +803,7 @@ class PythonRecipe(Recipe): 'python')) env['LDFLAGS'] += ' -L{}'.format( join(ndk_dir_python, 'libs', arch.arch)) - env['LDFLAGS'] += ' -lpython{}m'.format(python_short_version) + env['LDFLAGS'] += ' -lpython{}'.format(python_short_version) hppath = [] hppath.append(join(dirname(self.hostpython_location), 'Lib')) diff --git a/recipes/cffi/__init__.py b/recipes/cffi/__init__.py index 861a365..cc4dc05 100644 --- a/recipes/cffi/__init__.py +++ b/recipes/cffi/__init__.py @@ -48,7 +48,7 @@ class CffiRecipe(CompiledComponentsPythonRecipe): python_version = self.ctx.python_recipe.version[0:3] ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version) env['LDFLAGS'] += ' -L{}'.format(os.path.join(ndk_dir_python, 'libs', arch.arch)) - env['LDFLAGS'] += ' -lpython{}m'.format(python_version) + env['LDFLAGS'] += ' -lpython{}'.format(python_version) # until `pythonforandroid/archs.py` gets merged upstream: # https://github.com/kivy/python-for-android/pull/1250/files#diff-569e13021e33ced8b54385f55b49cbe6 env['CFLAGS'] += ' -I{}/include/python/'.format(ndk_dir_python) diff --git a/recipes/coincurve/__init__.py b/recipes/coincurve/__init__.py index 4d3f58f..5be9557 100644 --- a/recipes/coincurve/__init__.py +++ b/recipes/coincurve/__init__.py @@ -26,7 +26,7 @@ class CoincurveRecipe(CompiledComponentsPythonRecipe): if self.ctx.ndk == 'crystax': ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version) env['LDFLAGS'] += ' -L{}'.format(os.path.join(ndk_dir_python, 'libs', arch.arch)) - env['LDFLAGS'] += ' -lpython{}m'.format(python_version) + env['LDFLAGS'] += ' -lpython{}'.format(python_version) # until `pythonforandroid/archs.py` gets merged upstream: # https://github.com/kivy/python-for-android/pull/1250/files#diff-569e13021e33ced8b54385f55b49cbe6 env['CFLAGS'] += ' -I{}/include/python/'.format(ndk_dir_python) diff --git a/recipes/cryptography/__init__.py b/recipes/cryptography/__init__.py index 1aa84f6..148a121 100644 --- a/recipes/cryptography/__init__.py +++ b/recipes/cryptography/__init__.py @@ -26,7 +26,7 @@ class CryptographyRecipe(CompiledComponentsPythonRecipe): python_version = self.ctx.python_recipe.version[0:3] ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version) env['LDFLAGS'] += ' -L{}'.format(os.path.join(ndk_dir_python, 'libs', arch.arch)) - env['LDFLAGS'] += ' -lpython{}m'.format(python_version) + env['LDFLAGS'] += ' -lpython{}'.format(python_version) # until `pythonforandroid/archs.py` gets merged upstream: # https://github.com/kivy/python-for-android/pull/1250/files#diff-569e13021e33ced8b54385f55b49cbe6 env['CFLAGS'] += ' -I{}/include/python/'.format(ndk_dir_python) + ' -L{}'.format(os.path.join(ndk_dir_python, 'libs', arch.arch)) diff --git a/recipes/netifaces/__init__.py b/recipes/netifaces/__init__.py index 252499c..50634d8 100644 --- a/recipes/netifaces/__init__.py +++ b/recipes/netifaces/__init__.py @@ -23,7 +23,7 @@ class NetifacesRecipe(CompiledComponentsPythonRecipe): python_version = self.ctx.python_recipe.version[0:3] ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version) env['LDFLAGS'] += ' -L{}'.format(os.path.join(ndk_dir_python, 'libs', arch.arch)) - env['LDFLAGS'] += ' -lpython{}m'.format(python_version) + env['LDFLAGS'] += ' -lpython{}'.format(python_version) # until `pythonforandroid/archs.py` gets merged upstream: # https://github.com/kivy/python-for-android/pull/1250/files#diff-569e13021e33ced8b54385f55b49cbe6 env['CFLAGS'] += ' -I{}/include/python/'.format(ndk_dir_python) diff --git a/recipes/python3crystax/__init__.py b/recipes/python3crystax/__init__.py index 71e20aa..0844792 100644 --- a/recipes/python3crystax/__init__.py +++ b/recipes/python3crystax/__init__.py @@ -212,7 +212,11 @@ class Python3Recipe(TargetPythonRecipe): os.mkdir(join(ndk_sources_python_dir, '3.9')) sh.sed('s#3.5#3.9#', join(ndk_sources_python_dir, '3.5/Android.mk'), + _out=join(ndk_sources_python_dir, '3.9/Android.mk.tmp')) + sh.sed('s#3.9m#3.9#', + join(ndk_sources_python_dir, '3.9/Android.mk.tmp'), _out=join(ndk_sources_python_dir, '3.9/Android.mk')) + shprint(sh.rm, '-f', join(ndk_sources_python_dir, '3.9/Android.mk.tmp')) def build_arch(self, arch): # If openssl is needed we may have to recompile cPython to get the diff --git a/recipes/python3crystax/interpreter.c.3.9 b/recipes/python3crystax/interpreter.c.3.9 index 7b93557..c914e97 100644 --- a/recipes/python3crystax/interpreter.c.3.9 +++ b/recipes/python3crystax/interpreter.c.3.9 @@ -9,7 +9,7 @@ #define PYTHON3_STDLIB_REL_PATH "stdlib.zip" #define PYTHON3_MODULES_REL_PATH "modules" -#define PYTHON3_DLL_REL_PATH "libpython3.9m.so" +#define PYTHON3_DLL_REL_PATH "libpython3.9.so" #define SYS_PATH_BUFFER_SIZE (2*(PATH_MAX + 1)) diff --git a/scripts/build-target-python.sh b/scripts/build-target-python.sh index 3f1928a..409d34c 100755 --- a/scripts/build-target-python.sh +++ b/scripts/build-target-python.sh @@ -386,8 +386,8 @@ build_python_for_abi () if [ "$PYTHON_MAJOR_VERSION" = "2" ]; then local PYTHON_CORE_MODULE_NAME='python'"$PYTHON_ABI" else - local PYTHON_CORE_MODULE_NAME='python'"$PYTHON_ABI"'m' - local PYTHON_SOABI='cpython-'"$PYTHON_ABI"'m' + local PYTHON_CORE_MODULE_NAME='python'"$PYTHON_ABI" + local PYTHON_SOABI='cpython-'"$PYTHON_ABI" fi { echo 'LOCAL_PATH := $(call my-dir)'