From 769e12bc71965389f2a13b96d4def71032013fbe Mon Sep 17 00:00:00 2001 From: RobertF <34464649+RobertFlatt@users.noreply.github.com> Date: Tue, 11 Mar 2025 13:49:57 -1000 Subject: [PATCH 1/6] Create __init__.py Recreate recipe, implement as PyProjectRecipe, update version. --- pythonforandroid/recipes/cppy/__init__.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pythonforandroid/recipes/cppy/__init__.py diff --git a/pythonforandroid/recipes/cppy/__init__.py b/pythonforandroid/recipes/cppy/__init__.py new file mode 100644 index 000000000..ea759d04d --- /dev/null +++ b/pythonforandroid/recipes/cppy/__init__.py @@ -0,0 +1,17 @@ +from pythonforandroid.recipe import PyProjectRecipe + + +class CppyRecipe(PyProjectRecipe): + site_packages_name = 'cppy' + version = '1.3.1' + url = 'https://github.com/nucleic/cppy/archive/refs/tags/{version}.zip' + call_hostpython_via_targetpython = False + depends = ['setuptools'] + + def get_recipe_env(self, arch, **kwargs): + env = super().get_recipe_env(arch, **kwargs) + env["SETUPTOOLS_SCM_PRETEND_VERSION_FOR_CPPY"] = self.version + return env + + +recipe = CppyRecipe() From 4e40730c876ca9a7f0e1d959725c63e2ec7ac2b7 Mon Sep 17 00:00:00 2001 From: RobertF <34464649+RobertFlatt@users.noreply.github.com> Date: Tue, 11 Mar 2025 13:52:12 -1000 Subject: [PATCH 2/6] Update __init__.py Update version, add cppy dependency. --- pythonforandroid/recipes/atom/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pythonforandroid/recipes/atom/__init__.py b/pythonforandroid/recipes/atom/__init__.py index 51923d548..f45236ae2 100644 --- a/pythonforandroid/recipes/atom/__init__.py +++ b/pythonforandroid/recipes/atom/__init__.py @@ -3,8 +3,9 @@ class AtomRecipe(CppCompiledComponentsPythonRecipe): site_packages_name = 'atom' - version = '0.3.10' - url = 'https://github.com/nucleic/atom/archive/master.zip' + version = '0.11.0' + url = 'https://github.com/nucleic/atom/archive/refs/tags/{version}.zip' + hostpython_prerequisites = ['cppy'] depends = ['setuptools'] From b1acbed55aa4d2d7c546dd19c9b35eb939c0de96 Mon Sep 17 00:00:00 2001 From: RobertF <34464649+RobertFlatt@users.noreply.github.com> Date: Tue, 11 Mar 2025 13:54:49 -1000 Subject: [PATCH 3/6] Update __init__.py Update version, remove patch. --- pythonforandroid/recipes/enaml/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pythonforandroid/recipes/enaml/__init__.py b/pythonforandroid/recipes/enaml/__init__.py index d2335206c..bd1247add 100644 --- a/pythonforandroid/recipes/enaml/__init__.py +++ b/pythonforandroid/recipes/enaml/__init__.py @@ -3,9 +3,8 @@ class EnamlRecipe(CppCompiledComponentsPythonRecipe): site_packages_name = 'enaml' - version = '0.9.8' - url = 'https://github.com/nucleic/enaml/archive/{version}.zip' - patches = ['0001-Update-setup.py.patch'] # Remove PyQt dependency + version = '0.18.0' + url = 'https://github.com/nucleic/enaml/archive/refs/tags/{version}.zip' depends = ['setuptools', 'atom', 'kiwisolver'] From d65e3c6a4eb82b77e1cfe1d71917a69effd07e8f Mon Sep 17 00:00:00 2001 From: RobertF <34464649+RobertFlatt@users.noreply.github.com> Date: Tue, 11 Mar 2025 13:55:14 -1000 Subject: [PATCH 4/6] Delete pythonforandroid/recipes/enaml/0001-Update-setup.py.patch remove patch --- .../recipes/enaml/0001-Update-setup.py.patch | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 pythonforandroid/recipes/enaml/0001-Update-setup.py.patch diff --git a/pythonforandroid/recipes/enaml/0001-Update-setup.py.patch b/pythonforandroid/recipes/enaml/0001-Update-setup.py.patch deleted file mode 100644 index c84f892dc..000000000 --- a/pythonforandroid/recipes/enaml/0001-Update-setup.py.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 156a0426f7350bf49bdfae1aad555e13c9494b9a Mon Sep 17 00:00:00 2001 -From: frmdstryr -Date: Thu, 23 Jun 2016 22:04:32 -0400 -Subject: [PATCH] Update setup.py - ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 3bfd2a2..99817e5 100644 ---- a/setup.py -+++ b/setup.py -@@ -72,7 +72,7 @@ setup( - url='https://github.com/nucleic/enaml', - description='Declarative DSL for building rich user interfaces in Python', - long_description=open('README.rst').read(), -- requires=['atom', 'PyQt', 'ply', 'kiwisolver'], -+ requires=['atom', 'ply', 'kiwisolver'], - install_requires=['distribute', 'atom >= 0.3.8', 'kiwisolver >= 0.1.2', 'ply >= 3.4'], - packages=find_packages(), - package_data={ --- -2.7.4 - From 85d9d23b18f7a1b306100bec59e63da257d55001 Mon Sep 17 00:00:00 2001 From: RobertF <34464649+RobertFlatt@users.noreply.github.com> Date: Tue, 11 Mar 2025 14:00:04 -1000 Subject: [PATCH 5/6] Update __init__.py Bump version, change depends to hostpython_prerequisites. Fix https://github.com/kivy/python-for-android/issues/3122 --- pythonforandroid/recipes/kiwisolver/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pythonforandroid/recipes/kiwisolver/__init__.py b/pythonforandroid/recipes/kiwisolver/__init__.py index d94af0f14..e0b9be48d 100644 --- a/pythonforandroid/recipes/kiwisolver/__init__.py +++ b/pythonforandroid/recipes/kiwisolver/__init__.py @@ -3,17 +3,17 @@ class KiwiSolverRecipe(PyProjectRecipe): site_packages_name = 'kiwisolver' - version = '1.4.5' + version = '1.4.8' url = 'git+https://github.com/nucleic/kiwi' - depends = ['cppy'] + hostpython_prerequisites = ['cppy'] need_stl_shared = True # from https://github.com/kivy/python-for-android/issues/3115 def get_recipe_env(self, arch, **kwargs): env = super().get_recipe_env(arch, **kwargs) flags = " -I" + self.ctx.python_recipe.include_root(arch.arch) - env["CFLAGS"] = flags - env["CPPFLAGS"] = flags + env["CFLAGS"] += flags + env["CPPFLAGS"] += flags return env From 39331601cc1878cd1f1d568c581ae35a7e4b95d1 Mon Sep 17 00:00:00 2001 From: RobertF <34464649+RobertFlatt@users.noreply.github.com> Date: Thu, 13 Mar 2025 14:51:35 -1000 Subject: [PATCH 6/6] Update __init__.py Add a warning that atom will not be built for 32 bit targets. --- pythonforandroid/recipes/atom/__init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pythonforandroid/recipes/atom/__init__.py b/pythonforandroid/recipes/atom/__init__.py index f45236ae2..8ebc909e1 100644 --- a/pythonforandroid/recipes/atom/__init__.py +++ b/pythonforandroid/recipes/atom/__init__.py @@ -8,5 +8,16 @@ class AtomRecipe(CppCompiledComponentsPythonRecipe): hostpython_prerequisites = ['cppy'] depends = ['setuptools'] + def build_arch(self, arch): + if arch.arch in ["armeabi-v7a", "x86"]: + warning("*******************************************") + warning("******** atom recipe was not built ********") + warning("* atom does not support 32 bit platforms **") + warning("*** Expect the following run time error ***") + warning("ModuleNotFoundError: No module named 'atom'") + warning("*******************************************") + else: + super().build_arch(arch) + recipe = AtomRecipe()