Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected static ArrayList<String> getLibraries(File libsDir) {
addLibraryIfExists(libsList, name, libsDir);
}

for (int v = 5; v <= 14; v++) {
for (int v = 14; v >= 5; v--) {
libsList.add("python3." + v + (v <= 7 ? "m" : ""));
}

Expand Down
24 changes: 9 additions & 15 deletions pythonforandroid/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,18 +1020,11 @@ def install_python_package(self, arch, name=None, env=None, is_dir=True):
hostpython = sh.Command(self.hostpython_location)
hpenv = env.copy()
with current_directory(self.get_build_dir(arch.arch)):

if isfile("setup.py"):
shprint(hostpython, 'setup.py', 'install', '-O2',
'--root={}'.format(self.ctx.get_python_install_dir(arch.arch)),
'--install-lib=.',
_env=hpenv, *self.setup_extra_args)

# If asked, also install in the hostpython build dir
if self.install_in_hostpython:
self.install_hostpython_package(arch)
else:
warning("`PythonRecipe.install_python_package` called without `setup.py` file!")
shprint(hostpython, '-m', 'pip', 'install', '.',
'--compile',
f'--root={self.ctx.get_python_install_dir(arch.arch)}',
_env=hpenv, *self.setup_extra_args
)

def get_hostrecipe_env(self, arch=None):
env = environ.copy()
Expand All @@ -1048,7 +1041,8 @@ def hostpython_site_dir(self):
def install_hostpython_package(self, arch):
env = self.get_hostrecipe_env(arch)
real_hostpython = sh.Command(self.real_hostpython_location)
shprint(real_hostpython, 'setup.py', 'install', '-O2',
shprint(real_hostpython, '-m', 'pip', 'install', '.',
'--compile',
'--install-lib=Lib/site-packages',
'--root={}'.format(self._host_recipe.site_root),
_env=env, *self.setup_extra_args)
Expand Down Expand Up @@ -1095,7 +1089,7 @@ class CompiledComponentsPythonRecipe(PythonRecipe):

def build_arch(self, arch):
'''Build any cython components, then install the Python module by
calling setup.py install with the target Python dir.
calling pip install with the target Python dir.
'''
Recipe.build_arch(self, arch)
self.install_hostpython_prerequisites()
Expand Down Expand Up @@ -1144,7 +1138,7 @@ class CythonRecipe(PythonRecipe):

def build_arch(self, arch):
'''Build any cython components, then install the Python module by
calling setup.py install with the target Python dir.
calling pip install with the target Python dir.
'''
Recipe.build_arch(self, arch)
self.build_cython_components(arch)
Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/hostpython3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class HostPython3Recipe(Recipe):
:class:`~pythonforandroid.python.HostPythonRecipe`
'''

version = '3.11.13'
version = '3.14.0'

url = 'https://github.com/python/cpython/archive/refs/tags/v{version}.tar.gz'
'''The default url to download our host python recipe. This url will
Expand Down
13 changes: 4 additions & 9 deletions pythonforandroid/recipes/python3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Python3Recipe(TargetPythonRecipe):
:class:`~pythonforandroid.python.GuestPythonRecipe`
'''

version = '3.11.13'
version = '3.14.0'
_p_version = Version(version)
url = 'https://github.com/python/cpython/archive/refs/tags/v{version}.tar.gz'
name = 'python3'
Expand Down Expand Up @@ -389,17 +389,12 @@ def create_python_bundle(self, dirn, arch):
place.
"""
# Todo: find a better way to find the build libs folder
modules_build_dir = join(
modules_build_dir = glob.glob(join(
self.get_build_dir(arch.arch),
'android-build',
'build',
'lib.{}{}-{}-{}'.format(
# android is now supported platform
"android" if self._p_version.minor >= 13 else "linux",
'2' if self.version[0] == '2' else '',
arch.command_prefix.split('-')[0],
self.major_minor_version_string
))
'lib.*'
))[0]

# Compile to *.pyc the python modules
self.compile_python_files(modules_build_dir)
Expand Down
10 changes: 0 additions & 10 deletions pythonforandroid/recipes/six/__init__.py

This file was deleted.

Loading