Python 3.10.0rc1 build
This commit is contained in:
parent
ec5a213a23
commit
7585e64559
20 changed files with 103 additions and 134 deletions
|
@ -39,7 +39,7 @@ version.filename = %(source.dir)s/main.py
|
||||||
|
|
||||||
# (list) Application requirements
|
# (list) Application requirements
|
||||||
# comma seperated e.g. requirements = sqlite3,kivy
|
# comma seperated e.g. requirements = sqlite3,kivy
|
||||||
requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro==1.4.0, pyjnius, certifi==2021.5.30, appdirs==1.4.3, docopt==0.6.2, base58==1.0.0, colorama==0.3.7, ecdsa==0.13.3, jsonschema==2.6.0, pbkdf2==1.3, pyyaml, protobuf==3.6.1, keyring==10.4.0, defusedxml, aioupnp==0.0.17, asn1crypto, mock, netifaces, cryptography, aiohttp==3.6.0, multidict==4.5.2, idna, yarl==1.3.0, chardet==3.0.4, async_timeout==3.0.1, coincurve, msgpack==0.6.1, six, attrs==18.2.0, pylru, hachoir, prometheus_client==0.8.0, "git+https://github.com/lbryio/lbry-sdk@v0.102.0#egg=lbry"
|
requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro==1.4.0, pyjnius, certifi==2021.5.30, appdirs==1.4.3, docopt==0.6.2, base58==1.0.0, colorama==0.3.7, ecdsa==0.13.3, jsonschema==2.6.0, pbkdf2==1.3, pyyaml, protobuf==3.6.1, keyring==10.4.0, defusedxml, aioupnp==0.0.17, asn1crypto, mock, cryptography, aiohttp==3.6.0, multidict==4.5.2, idna, yarl==1.3.0, chardet==3.0.4, async_timeout==3.0.1, coincurve, msgpack==0.6.1, six, attrs==18.2.0, pylru, hachoir, prometheus_client==0.8.0, "git+https://github.com/lbryio/lbry-sdk@v0.102.0#egg=lbry"
|
||||||
|
|
||||||
# (str) Custom source folders for requirements
|
# (str) Custom source folders for requirements
|
||||||
# Sets custom source for any requirements with recipes
|
# Sets custom source for any requirements with recipes
|
||||||
|
|
|
@ -39,7 +39,7 @@ version.filename = %(source.dir)s/main.py
|
||||||
|
|
||||||
# (list) Application requirements
|
# (list) Application requirements
|
||||||
# comma seperated e.g. requirements = sqlite3,kivy
|
# comma seperated e.g. requirements = sqlite3,kivy
|
||||||
requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro==1.4.0, pyjnius, certifi==2021.5.30, appdirs==1.4.3, docopt==0.6.2, base58==1.0.0, colorama==0.3.7, ecdsa==0.13.3, jsonschema==2.6.0, pbkdf2==1.3, pyyaml, protobuf==3.6.1, keyring==10.4.0, defusedxml, aioupnp==0.0.17, asn1crypto, mock, netifaces, cryptography, aiohttp==3.6.0, multidict==4.5.2, idna, yarl==1.3.0, chardet==3.0.4, async_timeout==3.0.1, coincurve, msgpack==0.6.1, six, attrs==18.2.0, pylru, hachoir, prometheus_client==0.8.0, "git+https://github.com/lbryio/lbry-sdk@v0.102.0#egg=lbry"
|
requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro==1.4.0, pyjnius, certifi==2021.5.30, appdirs==1.4.3, docopt==0.6.2, base58==1.0.0, colorama==0.3.7, ecdsa==0.13.3, jsonschema==2.6.0, pbkdf2==1.3, pyyaml, protobuf==3.6.1, keyring==10.4.0, defusedxml, aioupnp==0.0.17, asn1crypto, mock, cryptography, aiohttp==3.6.0, multidict==4.5.2, idna, yarl==1.3.0, chardet==3.0.4, async_timeout==3.0.1, coincurve, msgpack==0.6.1, six, attrs==18.2.0, pylru, hachoir, prometheus_client==0.8.0, "git+https://github.com/lbryio/lbry-sdk@v0.102.0#egg=lbry"
|
||||||
|
|
||||||
# (str) Custom source folders for requirements
|
# (str) Custom source folders for requirements
|
||||||
# Sets custom source for any requirements with recipes
|
# Sets custom source for any requirements with recipes
|
||||||
|
|
|
@ -39,7 +39,7 @@ version.filename = %(source.dir)s/main.py
|
||||||
|
|
||||||
# (list) Application requirements
|
# (list) Application requirements
|
||||||
# comma seperated e.g. requirements = sqlite3,kivy
|
# comma seperated e.g. requirements = sqlite3,kivy
|
||||||
requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro==1.4.0, pyjnius, certifi==2021.5.30, appdirs==1.4.3, docopt==0.6.2, base58==1.0.0, colorama==0.3.7, ecdsa==0.13.3, jsonschema==2.6.0, pbkdf2==1.3, pyyaml, protobuf==3.6.1, keyring==10.4.0, defusedxml, aioupnp==0.0.17, asn1crypto, mock, netifaces, cryptography, aiohttp==3.6.0, multidict==4.5.2, idna, yarl==1.3.0, chardet==3.0.4, async_timeout==3.0.1, coincurve, msgpack==0.6.1, six, attrs==18.2.0, pylru, hachoir, prometheus_client==0.8.0, "git+https://github.com/lbryio/lbry-sdk@v0.102.0#egg=lbry"
|
requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro==1.4.0, pyjnius, certifi==2021.5.30, appdirs==1.4.3, docopt==0.6.2, base58==1.0.0, colorama==0.3.7, ecdsa==0.13.3, jsonschema==2.6.0, pbkdf2==1.3, pyyaml, protobuf==3.6.1, keyring==10.4.0, defusedxml, aioupnp==0.0.17, asn1crypto, mock, cryptography, aiohttp==3.6.0, multidict==4.5.2, idna, yarl==1.3.0, chardet==3.0.4, async_timeout==3.0.1, coincurve, msgpack==0.6.1, six, attrs==18.2.0, pylru, hachoir, prometheus_client==0.8.0, "git+https://github.com/lbryio/lbry-sdk@v0.102.0#egg=lbry"
|
||||||
|
|
||||||
# (str) Custom source folders for requirements
|
# (str) Custom source folders for requirements
|
||||||
# Sets custom source for any requirements with recipes
|
# Sets custom source for any requirements with recipes
|
||||||
|
|
|
@ -39,7 +39,7 @@ version.filename = %(source.dir)s/main.py
|
||||||
|
|
||||||
# (list) Application requirements
|
# (list) Application requirements
|
||||||
# comma seperated e.g. requirements = sqlite3,kivy
|
# comma seperated e.g. requirements = sqlite3,kivy
|
||||||
requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro==1.4.0, pyjnius, certifi==2021.5.30, appdirs==1.4.3, docopt==0.6.2, base58==1.0.0, colorama==0.3.7, ecdsa==0.13.3, jsonschema==2.6.0, pbkdf2==1.3, pyyaml, protobuf==3.6.1, keyring==10.4.0, defusedxml, git+https://github.com/lbryio/aioupnp.git@ab7ef0048bbce6404e463d20e8a15046ea6941f0#egg=aioupnp, asn1crypto, mock, netifaces, cryptography, aiohttp==3.6.0, multidict==4.5.2, idna, yarl==1.3.0, chardet==3.0.4, async_timeout==3.0.1, coincurve, msgpack==0.6.1, six, attrs==18.2.0, pylru, hachoir, prometheus_client==0.7.1, "git+https://github.com/lbryio/lbry-sdk@v0.102.0#egg=lbry"
|
requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro==1.4.0, pyjnius, certifi==2021.5.30, appdirs==1.4.3, docopt==0.6.2, base58==1.0.0, colorama==0.3.7, ecdsa==0.13.3, jsonschema==2.6.0, pbkdf2==1.3, pyyaml, protobuf==3.6.1, keyring==10.4.0, defusedxml, git+https://github.com/lbryio/aioupnp.git@ab7ef0048bbce6404e463d20e8a15046ea6941f0#egg=aioupnp, asn1crypto, mock, cryptography, aiohttp==3.6.0, multidict==4.5.2, idna, yarl==1.3.0, chardet==3.0.4, async_timeout==3.0.1, coincurve, msgpack==0.6.1, six, attrs==18.2.0, pylru, hachoir, prometheus_client==0.7.1, "git+https://github.com/lbryio/lbry-sdk@v0.102.0#egg=lbry"
|
||||||
|
|
||||||
# (str) Custom source folders for requirements
|
# (str) Custom source folders for requirements
|
||||||
# Sets custom source for any requirements with recipes
|
# Sets custom source for any requirements with recipes
|
||||||
|
|
|
@ -83,7 +83,7 @@ class Arch(object):
|
||||||
env['CFLAGS'] += ' -isysroot {} '.format(sysroot)
|
env['CFLAGS'] += ' -isysroot {} '.format(sysroot)
|
||||||
env['CFLAGS'] += '-I' + join(self.ctx.get_python_install_dir(),
|
env['CFLAGS'] += '-I' + join(self.ctx.get_python_install_dir(),
|
||||||
'include/python{}'.format(
|
'include/python{}'.format(
|
||||||
self.ctx.python_recipe.version[0:3])
|
self.ctx.python_recipe.version)
|
||||||
)
|
)
|
||||||
|
|
||||||
env['LDFLAGS'] += '--sysroot={} '.format(self.ctx.ndk_platform)
|
env['LDFLAGS'] += '--sysroot={} '.format(self.ctx.ndk_platform)
|
||||||
|
@ -157,7 +157,7 @@ class Arch(object):
|
||||||
if self.ctx.python_recipe and self.ctx.python_recipe.from_crystax:
|
if self.ctx.python_recipe and self.ctx.python_recipe.from_crystax:
|
||||||
# For crystax python, we can't use the host python headers:
|
# For crystax python, we can't use the host python headers:
|
||||||
env["CFLAGS"] += ' -I{}/sources/python/{}/include/python/'.\
|
env["CFLAGS"] += ' -I{}/sources/python/{}/include/python/'.\
|
||||||
format(self.ctx.ndk_dir, self.ctx.python_recipe.version[0:3])
|
format(self.ctx.ndk_dir, self.ctx.python_recipe.version)
|
||||||
env['STRIP'] = '{}-strip --strip-unneeded'.format(command_prefix)
|
env['STRIP'] = '{}-strip --strip-unneeded'.format(command_prefix)
|
||||||
env['MAKE'] = 'make -j5'
|
env['MAKE'] = 'make -j5'
|
||||||
env['READELF'] = '{}-readelf'.format(command_prefix)
|
env['READELF'] = '{}-readelf'.format(command_prefix)
|
||||||
|
|
|
@ -5,7 +5,7 @@ from pythonforandroid.recipe import CompiledComponentsPythonRecipe
|
||||||
|
|
||||||
class CffiRecipe(CompiledComponentsPythonRecipe):
|
class CffiRecipe(CompiledComponentsPythonRecipe):
|
||||||
name = 'cffi'
|
name = 'cffi'
|
||||||
version = '1.13.2'
|
version = '1.14.1'
|
||||||
url = 'https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz'
|
url = 'https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz'
|
||||||
|
|
||||||
depends = [('python2', 'python3crystax'), 'setuptools', 'pycparser', 'libffi']
|
depends = [('python2', 'python3crystax'), 'setuptools', 'pycparser', 'libffi']
|
||||||
|
@ -45,7 +45,7 @@ class CffiRecipe(CompiledComponentsPythonRecipe):
|
||||||
])
|
])
|
||||||
if self.ctx.ndk == 'crystax':
|
if self.ctx.ndk == 'crystax':
|
||||||
# only keeps major.minor (discards patch)
|
# only keeps major.minor (discards patch)
|
||||||
python_version = self.ctx.python_recipe.version[0:3]
|
python_version = self.ctx.python_recipe.version
|
||||||
ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version)
|
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'] += ' -L{}'.format(os.path.join(ndk_dir_python, 'libs', arch.arch))
|
||||||
env['LDFLAGS'] += ' -lpython{}'.format(python_version)
|
env['LDFLAGS'] += ' -lpython{}'.format(python_version)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class CoincurveRecipe(CompiledComponentsPythonRecipe):
|
||||||
env['LDFLAGS'] += ' -L{}'.format(os.path.join(libsecp256k1_dir, '.libs'))
|
env['LDFLAGS'] += ' -L{}'.format(os.path.join(libsecp256k1_dir, '.libs'))
|
||||||
env['CFLAGS'] += ' -I' + os.path.join(libsecp256k1_dir, 'include')
|
env['CFLAGS'] += ' -I' + os.path.join(libsecp256k1_dir, 'include')
|
||||||
# only keeps major.minor (discards patch)
|
# only keeps major.minor (discards patch)
|
||||||
python_version = self.ctx.python_recipe.version[0:3]
|
python_version = self.ctx.python_recipe.version
|
||||||
# required additional library and path for Crystax
|
# required additional library and path for Crystax
|
||||||
if self.ctx.ndk == 'crystax':
|
if self.ctx.ndk == 'crystax':
|
||||||
ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version)
|
ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version)
|
||||||
|
|
|
@ -23,7 +23,7 @@ class CryptographyRecipe(CompiledComponentsPythonRecipe):
|
||||||
|
|
||||||
if self.ctx.ndk == 'crystax':
|
if self.ctx.ndk == 'crystax':
|
||||||
# only keeps major.minor (discards patch)
|
# only keeps major.minor (discards patch)
|
||||||
python_version = self.ctx.python_recipe.version[0:3]
|
python_version = self.ctx.python_recipe.version
|
||||||
ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version)
|
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'] += ' -L{}'.format(os.path.join(ndk_dir_python, 'libs', arch.arch))
|
||||||
env['LDFLAGS'] += ' -lpython{}'.format(python_version)
|
env['LDFLAGS'] += ' -lpython{}'.format(python_version)
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
from pythonforandroid.recipe import PythonRecipe
|
|
||||||
|
|
||||||
|
|
||||||
class IdnaRecipe(PythonRecipe):
|
|
||||||
name = 'idna'
|
|
||||||
version = '2.6'
|
|
||||||
url = 'https://github.com/kjd/idna/archive/v{version}.tar.gz'
|
|
||||||
|
|
||||||
depends = [('python2', 'python3crystax'), 'setuptools']
|
|
||||||
|
|
||||||
call_hostpython_via_targetpython = False
|
|
||||||
|
|
||||||
|
|
||||||
recipe = IdnaRecipe()
|
|
|
@ -1,33 +0,0 @@
|
||||||
|
|
||||||
import glob
|
|
||||||
from pythonforandroid.recipe import CompiledComponentsPythonRecipe, Recipe
|
|
||||||
from os.path import join
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
|
|
||||||
|
|
||||||
class NetifacesRecipe(CompiledComponentsPythonRecipe):
|
|
||||||
version = '0.10.7'
|
|
||||||
url = 'https://files.pythonhosted.org/packages/81/39/4e9a026265ba944ddf1fea176dbb29e0fe50c43717ba4fcf3646d099fe38/netifaces-{version}.tar.gz'
|
|
||||||
depends = [('python2', 'python3crystax'), 'setuptools']
|
|
||||||
call_hostpython_via_targetpython = False
|
|
||||||
patches = ['socket-ioctls.patch']
|
|
||||||
|
|
||||||
def get_recipe_env(self, arch):
|
|
||||||
env = super(NetifacesRecipe, self).get_recipe_env(arch)
|
|
||||||
|
|
||||||
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions'
|
|
||||||
|
|
||||||
if self.ctx.ndk == 'crystax':
|
|
||||||
# only keeps major.minor (discards patch)
|
|
||||||
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{}'.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)
|
|
||||||
|
|
||||||
return env
|
|
||||||
|
|
||||||
recipe = NetifacesRecipe()
|
|
|
@ -1,29 +0,0 @@
|
||||||
--- a/netifaces.c 2018-09-25 21:26:48.238476102 +0100
|
|
||||||
+++ b/netifaces.c 2018-09-25 21:55:14.201995669 +0100
|
|
||||||
@@ -22,6 +22,10 @@
|
|
||||||
obj = Py_InitModule3((name), (methods), (doc));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#ifndef HAVE_SOCKET_IOCTLS
|
|
||||||
+#define HAVE_SOCKET_IOCTLS 1
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#ifndef WIN32
|
|
||||||
|
|
||||||
# include <sys/types.h>
|
|
||||||
@@ -178,12 +182,12 @@
|
|
||||||
# include <ifaddrs.h>
|
|
||||||
# endif /* HAVE_GETIFADDRS */
|
|
||||||
|
|
||||||
-# if !HAVE_GETIFADDRS && (!HAVE_SOCKET_IOCTLS || !HAVE_SIOCGIFCONF)
|
|
||||||
+//# if !HAVE_GETIFADDRS && (!HAVE_SOCKET_IOCTLS || !HAVE_SIOCGIFCONF)
|
|
||||||
/* If the platform doesn't define, what we need, barf. If you're seeing this,
|
|
||||||
it means you need to write suitable code to retrieve interface information
|
|
||||||
on your system. */
|
|
||||||
-# error You need to add code for your platform.
|
|
||||||
-# endif
|
|
||||||
+//# error You need to add code for your platform.
|
|
||||||
+//# endif
|
|
||||||
|
|
||||||
#else /* defined(WIN32) */
|
|
||||||
|
|
|
@ -34,7 +34,8 @@ LATEST_FULL_VERSION = {
|
||||||
'3.5': '3.5.1',
|
'3.5': '3.5.1',
|
||||||
'3.6': '3.6.6',
|
'3.6': '3.6.6',
|
||||||
'3.7': '3.7.1',
|
'3.7': '3.7.1',
|
||||||
'3.9': '3.9.6'
|
'3.9': '3.9.6',
|
||||||
|
'3.10': '3.10.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
def realpath(fname):
|
def realpath(fname):
|
||||||
|
@ -62,7 +63,7 @@ def realpath(fname):
|
||||||
return os.sep.join(abs_path)
|
return os.sep.join(abs_path)
|
||||||
|
|
||||||
class Python3Recipe(TargetPythonRecipe):
|
class Python3Recipe(TargetPythonRecipe):
|
||||||
version = '3.9'
|
version = '3.10'
|
||||||
url = ''
|
url = ''
|
||||||
name = 'python3crystax'
|
name = 'python3crystax'
|
||||||
|
|
||||||
|
@ -72,9 +73,12 @@ class Python3Recipe(TargetPythonRecipe):
|
||||||
from_crystax = True
|
from_crystax = True
|
||||||
|
|
||||||
def download_if_necessary(self):
|
def download_if_necessary(self):
|
||||||
if 'openssl' in self.ctx.recipe_build_order or self.version in ('3.6', '3.7', '3.9'):
|
if 'openssl' in self.ctx.recipe_build_order or self.version in ('3.6', '3.7', '3.9', '3.10'):
|
||||||
full_version = LATEST_FULL_VERSION[self.version]
|
full_version = LATEST_FULL_VERSION[self.version]
|
||||||
Python3Recipe.url = 'https://www.python.org/ftp/python/{0}.{1}.{2}/Python-{0}.{1}.{2}.tgz'.format(*full_version.split('.'))
|
version_suffix = 'rc1'
|
||||||
|
version_params = full_version.split('.')
|
||||||
|
version_params.append(version_suffix)
|
||||||
|
Python3Recipe.url = 'https://www.python.org/ftp/python/{0}.{1}.{2}/Python-{0}.{1}.{2}{3}.tgz'.format(*version_params)
|
||||||
super(Python3Recipe, self).download_if_necessary()
|
super(Python3Recipe, self).download_if_necessary()
|
||||||
|
|
||||||
def get_dir_name(self):
|
def get_dir_name(self):
|
||||||
|
@ -169,29 +173,39 @@ class Python3Recipe(TargetPythonRecipe):
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
def prebuild_arch(self, arch):
|
||||||
super(Python3Recipe, self).prebuild_arch(arch)
|
super(Python3Recipe, self).prebuild_arch(arch)
|
||||||
if self.version in ('3.6', '3.7', '3.9'):
|
if self.version in ('3.6', '3.7', '3.9', '3.10'):
|
||||||
Python3Recipe.patches = [
|
patches = ['remove_android_api_check{}'.format('_3.10' if self.version == '3.10' else '')]
|
||||||
'patch/patch_python3.6.patch',
|
if self.version in ('3.6', '3.7'):
|
||||||
'patch/remove_android_api_check.patch',
|
patches += [
|
||||||
'patch/selectors.patch'
|
'patch_python3.6',
|
||||||
]
|
'selectors'
|
||||||
|
]
|
||||||
if self.version in ('3.9'):
|
|
||||||
Python3Recipe.patches = [
|
if self.version in ('3.9', '3.10'):
|
||||||
'patch/remove_android_api_check.patch',
|
if self.version == '3.9':
|
||||||
'patch/patch_python3.9.patch',
|
patches += ['strdup']
|
||||||
'patch/platlibdir.patch',
|
|
||||||
'patch/strdup.patch',
|
if self.version == '3.10':
|
||||||
|
patches += ['py3.10.0_posixmodule']
|
||||||
|
|
||||||
|
patches += [
|
||||||
|
'patch_python3.9',
|
||||||
|
'platlibdir',
|
||||||
|
|
||||||
# from https://github.com/kivy/python-for-android/blob/develop/pythonforandroid/recipes/python3/__init__.py#L63
|
# from https://github.com/kivy/python-for-android/blob/develop/pythonforandroid/recipes/python3/__init__.py#L63
|
||||||
'patch/pyconfig_detection.patch',
|
'pyconfig_detection',
|
||||||
'patch/reproducible-buildinfo.diff',
|
'reproducible-buildinfo',
|
||||||
'patch/py3.8.1.patch'
|
'py3.8.1'
|
||||||
]
|
]
|
||||||
|
|
||||||
if sh.which('lld') is not None:
|
if sh.which('lld') is not None:
|
||||||
Python3Recipe.patches += ['patch/py3.8.1_fix_cortex_a8.patch']
|
patches += ['py3.8.1_fix_cortex_a8']
|
||||||
|
|
||||||
|
|
||||||
|
Python3Recipe.patches = []
|
||||||
|
for patch_name in patches:
|
||||||
|
Python3Recipe.patches.append('patch/{}.patch'.format(patch_name))
|
||||||
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
build_dir = self.get_build_dir(arch.arch)
|
||||||
|
|
||||||
# copy bundled libffi to _ctypes
|
# copy bundled libffi to _ctypes
|
||||||
|
|
|
@ -25,7 +25,6 @@ LOCAL_SRC_FILES := config.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/getopt.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/getopt.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/getplatform.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/getplatform.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/getversion.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/getversion.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/graminit.c \
|
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/hamt.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/hamt.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/hashtable.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/hashtable.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/import.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/import.c \
|
||||||
|
@ -36,7 +35,6 @@ LOCAL_SRC_FILES := config.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/mysnprintf.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/mysnprintf.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/mystrtoul.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/mystrtoul.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/pathconfig.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/pathconfig.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/peephole.c \
|
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/preconfig.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/preconfig.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/pyarena.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/pyarena.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/pyctype.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/pyctype.c \
|
||||||
|
@ -51,27 +49,21 @@ LOCAL_SRC_FILES := config.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/Python-ast.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/Python-ast.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/pythonrun.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/pythonrun.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/pytime.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/pytime.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/strdup.c \
|
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/structmember.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/structmember.c \
|
||||||
|
$(MY_PYTHON_SRC_ROOT)/Python/suggestions.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/symtable.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/symtable.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/sysmodule.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/sysmodule.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/thread.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/thread.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/traceback.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/traceback.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Python/_warnings.c \
|
$(MY_PYTHON_SRC_ROOT)/Python/_warnings.c \
|
||||||
\
|
\
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/acceler.c \
|
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/grammar1.c \
|
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/listnode.c \
|
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/myreadline.c \
|
$(MY_PYTHON_SRC_ROOT)/Parser/myreadline.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/node.c \
|
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/parser.c \
|
$(MY_PYTHON_SRC_ROOT)/Parser/parser.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/parsetok.c \
|
$(MY_PYTHON_SRC_ROOT)/Parser/peg_api.c \
|
||||||
|
$(MY_PYTHON_SRC_ROOT)/Parser/pegen.c \
|
||||||
|
$(MY_PYTHON_SRC_ROOT)/Parser/string_parser.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/token.c \
|
$(MY_PYTHON_SRC_ROOT)/Parser/token.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/tokenizer.c \
|
$(MY_PYTHON_SRC_ROOT)/Parser/tokenizer.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/pegen/parse.c \
|
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/pegen/parse_string.c \
|
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/pegen/peg_api.c \
|
|
||||||
$(MY_PYTHON_SRC_ROOT)/Parser/pegen/pegen.c \
|
|
||||||
\
|
\
|
||||||
$(MY_PYTHON_SRC_ROOT)/Objects/abstract.c \
|
$(MY_PYTHON_SRC_ROOT)/Objects/abstract.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Objects/accu.c \
|
$(MY_PYTHON_SRC_ROOT)/Objects/accu.c \
|
||||||
|
@ -115,6 +107,7 @@ LOCAL_SRC_FILES := config.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Objects/typeobject.c \
|
$(MY_PYTHON_SRC_ROOT)/Objects/typeobject.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Objects/unicodectype.c \
|
$(MY_PYTHON_SRC_ROOT)/Objects/unicodectype.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Objects/unicodeobject.c \
|
$(MY_PYTHON_SRC_ROOT)/Objects/unicodeobject.c \
|
||||||
|
$(MY_PYTHON_SRC_ROOT)/Objects/unionobject.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Objects/weakrefobject.c \
|
$(MY_PYTHON_SRC_ROOT)/Objects/weakrefobject.c \
|
||||||
\
|
\
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/_abc.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/_abc.c \
|
||||||
|
@ -150,7 +143,6 @@ LOCAL_SRC_FILES := config.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/_opcode.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/_opcode.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/_operator.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/_operator.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/ossaudiodev.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/ossaudiodev.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/parsermodule.c \
|
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/posixmodule.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/posixmodule.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/_posixsubprocess.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/_posixsubprocess.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/pwdmodule.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/pwdmodule.c \
|
||||||
|
@ -178,6 +170,7 @@ LOCAL_SRC_FILES := config.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/unicodedata.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/unicodedata.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/_weakref.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/_weakref.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/xxlimited.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/xxlimited.c \
|
||||||
|
$(MY_PYTHON_SRC_ROOT)/Modules/xxlimited_35.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/xxmodule.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/xxmodule.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/xxsubtype.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/xxsubtype.c \
|
||||||
$(MY_PYTHON_SRC_ROOT)/Modules/zlibmodule.c \
|
$(MY_PYTHON_SRC_ROOT)/Modules/zlibmodule.c \
|
|
@ -35,7 +35,6 @@ extern PyObject* PyInit__symtable(void);
|
||||||
extern PyObject* PyInit_mmap(void);
|
extern PyObject* PyInit_mmap(void);
|
||||||
extern PyObject* PyInit__csv(void);
|
extern PyObject* PyInit__csv(void);
|
||||||
extern PyObject* PyInit__sre(void);
|
extern PyObject* PyInit__sre(void);
|
||||||
extern PyObject* PyInit_parser(void);
|
|
||||||
extern PyObject* PyInit__struct(void);
|
extern PyObject* PyInit__struct(void);
|
||||||
extern PyObject* PyInit__datetime(void);
|
extern PyObject* PyInit__datetime(void);
|
||||||
extern PyObject* PyInit__functools(void);
|
extern PyObject* PyInit__functools(void);
|
||||||
|
@ -96,7 +95,6 @@ struct _inittab _PyImport_Inittab[] = {
|
||||||
{"mmap", PyInit_mmap},
|
{"mmap", PyInit_mmap},
|
||||||
{"_csv", PyInit__csv},
|
{"_csv", PyInit__csv},
|
||||||
{"_sre", PyInit__sre},
|
{"_sre", PyInit__sre},
|
||||||
{"parser", PyInit_parser},
|
|
||||||
{"_struct", PyInit__struct},
|
{"_struct", PyInit__struct},
|
||||||
{"_datetime", PyInit__datetime},
|
{"_datetime", PyInit__datetime},
|
||||||
{"_functools", PyInit__functools},
|
{"_functools", PyInit__functools},
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#define PYTHON3_STDLIB_REL_PATH "stdlib.zip"
|
#define PYTHON3_STDLIB_REL_PATH "stdlib.zip"
|
||||||
#define PYTHON3_MODULES_REL_PATH "modules"
|
#define PYTHON3_MODULES_REL_PATH "modules"
|
||||||
#define PYTHON3_DLL_REL_PATH "libpython3.9.so"
|
#define PYTHON3_DLL_REL_PATH "libpython3.10.so"
|
||||||
|
|
||||||
#define SYS_PATH_BUFFER_SIZE (2*(PATH_MAX + 1))
|
#define SYS_PATH_BUFFER_SIZE (2*(PATH_MAX + 1))
|
||||||
|
|
12
recipes/python3crystax/patch/py3.10.0_posixmodule.patch
Normal file
12
recipes/python3crystax/patch/py3.10.0_posixmodule.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
--- a/Modules/posixmodule.c 2021-08-02 20:53:59.000000000 +0100
|
||||||
|
+++ b/Modules/posixmodule.c 2021-08-21 12:06:16.897465398 +0100
|
||||||
|
@@ -15384,6 +15384,9 @@
|
||||||
|
#ifdef HAVE_EVENTFD
|
||||||
|
if (PyModule_AddIntMacro(m, EFD_CLOEXEC)) return -1;
|
||||||
|
if (PyModule_AddIntMacro(m, EFD_NONBLOCK)) return -1;
|
||||||
|
+# ifndef EFD_SEMAPHORE
|
||||||
|
+# define EFD_SEMAPHORE (1 << 0)
|
||||||
|
+# endif
|
||||||
|
if (PyModule_AddIntMacro(m, EFD_SEMAPHORE)) return -1;
|
||||||
|
#endif
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
--- a/configure 2021-08-02 20:53:59.000000000 +0100
|
||||||
|
+++ b/configure 2021-08-21 11:13:50.508648380 +0100
|
||||||
|
@@ -6241,33 +6241,6 @@
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
|
||||||
|
-if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
|
||||||
|
- ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
|
||||||
|
- _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
|
||||||
|
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
|
||||||
|
-printf "%s\n" "$ANDROID_API_LEVEL" >&6; }
|
||||||
|
- if test -z "$ANDROID_API_LEVEL"; then
|
||||||
|
- echo 'Fatal: you must define __ANDROID_API__'
|
||||||
|
- exit 1
|
||||||
|
- fi
|
||||||
|
-
|
||||||
|
-printf "%s\n" "#define ANDROID_API_LEVEL $ANDROID_API_LEVEL" >>confdefs.h
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
|
||||||
|
-printf %s "checking for the Android arm ABI... " >&6; }
|
||||||
|
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
|
||||||
|
-printf "%s\n" "$_arm_arch" >&6; }
|
||||||
|
- if test "$_arm_arch" = 7; then
|
||||||
|
- BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
|
||||||
|
- LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
|
||||||
|
- fi
|
||||||
|
-else
|
||||||
|
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
|
||||||
|
-printf "%s\n" "not Android" >&6; }
|
||||||
|
-fi
|
||||||
|
-rm -f conftest.c conftest.out
|
||||||
|
-
|
||||||
|
# Check for unsupported systems
|
||||||
|
case $ac_sys_system/$ac_sys_release in
|
||||||
|
atheos*|Linux*/1*)
|
|
@ -1,10 +0,0 @@
|
||||||
|
|
||||||
from pythonforandroid.recipe import PythonRecipe
|
|
||||||
|
|
||||||
|
|
||||||
class SixRecipe(PythonRecipe):
|
|
||||||
version = '1.9.0'
|
|
||||||
url = 'https://pypi.python.org/packages/source/s/six/six-{version}.tar.gz'
|
|
||||||
depends = [('python2', 'python3crystax')]
|
|
||||||
|
|
||||||
recipe = SixRecipe()
|
|
|
@ -648,6 +648,7 @@ build_python_for_abi ()
|
||||||
echo 'include $(CLEAR_VARS)'
|
echo 'include $(CLEAR_VARS)'
|
||||||
echo 'LOCAL_MODULE := _queue'
|
echo 'LOCAL_MODULE := _queue'
|
||||||
echo "MY_PYTHON_SRC_ROOT := $PYTHON_SRCDIR"
|
echo "MY_PYTHON_SRC_ROOT := $PYTHON_SRCDIR"
|
||||||
|
echo 'LOCAL_CFLAGS := -DPy_BUILD_CORE'
|
||||||
echo 'LOCAL_SRC_FILES := \'
|
echo 'LOCAL_SRC_FILES := \'
|
||||||
echo ' $(MY_PYTHON_SRC_ROOT)/Modules/_queuemodule.c'
|
echo ' $(MY_PYTHON_SRC_ROOT)/Modules/_queuemodule.c'
|
||||||
echo 'LOCAL_C_INCLUDES := $(MY_PYTHON_SRC_ROOT)/Include/internal'
|
echo 'LOCAL_C_INCLUDES := $(MY_PYTHON_SRC_ROOT)/Include/internal'
|
||||||
|
@ -950,6 +951,7 @@ build_python_for_abi ()
|
||||||
echo 'include $(CLEAR_VARS)'
|
echo 'include $(CLEAR_VARS)'
|
||||||
echo 'LOCAL_MODULE := unicodedata'
|
echo 'LOCAL_MODULE := unicodedata'
|
||||||
echo "MY_PYTHON_SRC_ROOT := $PYTHON_SRCDIR"
|
echo "MY_PYTHON_SRC_ROOT := $PYTHON_SRCDIR"
|
||||||
|
echo 'LOCAL_C_INCLUDES := $(MY_PYTHON_SRC_ROOT)/Include/internal'
|
||||||
echo 'LOCAL_SRC_FILES := \'
|
echo 'LOCAL_SRC_FILES := \'
|
||||||
echo ' $(MY_PYTHON_SRC_ROOT)/Modules/unicodedata.c'
|
echo ' $(MY_PYTHON_SRC_ROOT)/Modules/unicodedata.c'
|
||||||
echo 'LOCAL_STATIC_LIBRARIES := python_shared'
|
echo 'LOCAL_STATIC_LIBRARIES := python_shared'
|
||||||
|
|
Loading…
Reference in a new issue