From 5f0b46bbfb1a61a61417f1cd88c50c7fa3fcb296 Mon Sep 17 00:00:00 2001 From: Shyamnath Premnadh Date: Fri, 8 Dec 2023 13:09:13 +0100 Subject: [PATCH 1/2] Remove redundant veriable definition from recipes - Some of the variables like call_hostpython_via_targetpython, install_in_hostpython are redifined in the package recipes with the exact same value as its parent class, making the definitions redundant. This patch removes this redefinitions. --- pythonforandroid/recipes/aiohttp/__init__.py | 1 - pythonforandroid/recipes/flask/__init__.py | 1 - pythonforandroid/recipes/pandas/__init__.py | 3 --- pythonforandroid/recipes/protobuf_cpp/__init__.py | 1 - pythonforandroid/recipes/pygame/__init__.py | 1 - pythonforandroid/recipes/secp256k1/__init__.py | 2 -- pythonforandroid/recipes/sympy/__init__.py | 2 -- pythonforandroid/recipes/twisted/__init__.py | 3 --- 8 files changed, 14 deletions(-) diff --git a/pythonforandroid/recipes/aiohttp/__init__.py b/pythonforandroid/recipes/aiohttp/__init__.py index f32c653fcb..a205e74005 100644 --- a/pythonforandroid/recipes/aiohttp/__init__.py +++ b/pythonforandroid/recipes/aiohttp/__init__.py @@ -8,7 +8,6 @@ class AIOHTTPRecipe(CppCompiledComponentsPythonRecipe): # type: ignore # pylint url = "https://pypi.python.org/packages/source/a/aiohttp/aiohttp-{version}.tar.gz" name = "aiohttp" depends: List[str] = ["setuptools"] - call_hostpython_via_targetpython = False install_in_hostpython = True def get_recipe_env(self, arch): diff --git a/pythonforandroid/recipes/flask/__init__.py b/pythonforandroid/recipes/flask/__init__.py index b2729420da..4801a66ea6 100644 --- a/pythonforandroid/recipes/flask/__init__.py +++ b/pythonforandroid/recipes/flask/__init__.py @@ -11,7 +11,6 @@ class FlaskRecipe(PythonRecipe): python_depends = ['jinja2', 'werkzeug', 'markupsafe', 'itsdangerous', 'click'] call_hostpython_via_targetpython = False - install_in_hostpython = False recipe = FlaskRecipe() diff --git a/pythonforandroid/recipes/pandas/__init__.py b/pythonforandroid/recipes/pandas/__init__.py index a43209a339..326a295b13 100644 --- a/pythonforandroid/recipes/pandas/__init__.py +++ b/pythonforandroid/recipes/pandas/__init__.py @@ -12,9 +12,6 @@ class PandasRecipe(CppCompiledComponentsPythonRecipe): python_depends = ['python-dateutil', 'pytz'] patches = ['fix_numpy_includes.patch'] - call_hostpython_via_targetpython = False - need_stl_shared = True - def get_recipe_env(self, arch): env = super().get_recipe_env(arch) # we need the includes from our installed numpy at site packages diff --git a/pythonforandroid/recipes/protobuf_cpp/__init__.py b/pythonforandroid/recipes/protobuf_cpp/__init__.py index 7209e0909b..77b2a777d2 100644 --- a/pythonforandroid/recipes/protobuf_cpp/__init__.py +++ b/pythonforandroid/recipes/protobuf_cpp/__init__.py @@ -18,7 +18,6 @@ class ProtobufCppRecipe(CppCompiledComponentsPythonRecipe): name = 'protobuf_cpp' version = '3.6.1' url = 'https://github.com/google/protobuf/releases/download/v{version}/protobuf-python-{version}.tar.gz' - call_hostpython_via_targetpython = False depends = ['cffi', 'setuptools'] site_packages_name = 'google/protobuf/pyext' setup_extra_args = ['--cpp_implementation'] diff --git a/pythonforandroid/recipes/pygame/__init__.py b/pythonforandroid/recipes/pygame/__init__.py index 99124deff7..0c35954cd1 100644 --- a/pythonforandroid/recipes/pygame/__init__.py +++ b/pythonforandroid/recipes/pygame/__init__.py @@ -21,7 +21,6 @@ class Pygame2Recipe(CompiledComponentsPythonRecipe): depends = ['sdl2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'setuptools', 'jpeg', 'png'] call_hostpython_via_targetpython = False # Due to setuptools - install_in_hostpython = False def prebuild_arch(self, arch): super().prebuild_arch(arch) diff --git a/pythonforandroid/recipes/secp256k1/__init__.py b/pythonforandroid/recipes/secp256k1/__init__.py index 1b30642312..d9621eaf75 100644 --- a/pythonforandroid/recipes/secp256k1/__init__.py +++ b/pythonforandroid/recipes/secp256k1/__init__.py @@ -7,8 +7,6 @@ class Secp256k1Recipe(CppCompiledComponentsPythonRecipe): version = '0.13.2.4' url = 'https://github.com/ludbb/secp256k1-py/archive/{version}.tar.gz' - call_hostpython_via_targetpython = False - depends = [ 'openssl', 'hostpython3', diff --git a/pythonforandroid/recipes/sympy/__init__.py b/pythonforandroid/recipes/sympy/__init__.py index 8684a95e06..637f0e15cc 100644 --- a/pythonforandroid/recipes/sympy/__init__.py +++ b/pythonforandroid/recipes/sympy/__init__.py @@ -8,8 +8,6 @@ class SympyRecipe(PythonRecipe): depends = ['mpmath'] - call_hostpython_via_targetpython = True - patches = ['fix_timeutils.patch', 'fix_pretty_print.patch'] diff --git a/pythonforandroid/recipes/twisted/__init__.py b/pythonforandroid/recipes/twisted/__init__.py index 30a7af4bb9..83ee24ca17 100644 --- a/pythonforandroid/recipes/twisted/__init__.py +++ b/pythonforandroid/recipes/twisted/__init__.py @@ -11,9 +11,6 @@ class TwistedRecipe(CythonRecipe): depends = ['setuptools', 'zope_interface', 'incremental', 'constantly'] patches = ['incremental.patch', 'remove_tests.patch'] - call_hostpython_via_targetpython = False - install_in_hostpython = False - def prebuild_arch(self, arch): super().prebuild_arch(arch) # TODO Need to whitelist tty.pyo and termios.so here From 4a48385bb86c262983cc70ce441ba0c2e5ace4cb Mon Sep 17 00:00:00 2001 From: Shyamnath Premnadh Date: Mon, 11 Dec 2023 11:30:10 +0100 Subject: [PATCH 2/2] Add pygame to BROKEN_RECIPES_PYTHON3 - breaks the CI --- ci/constants.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/constants.py b/ci/constants.py index 52a996c90f..49358ac97e 100644 --- a/ci/constants.py +++ b/ci/constants.py @@ -41,6 +41,7 @@ class TargetPython(Enum): 'libtorrent', # pybind11 build fails on macos 'pybind11', + 'pygame', ]) BROKEN_RECIPES = {