Skip to content

Reinstate cppy recipe and update 3 related recipes. #3124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
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
16 changes: 14 additions & 2 deletions pythonforandroid/recipes/atom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,21 @@

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']

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()
17 changes: 17 additions & 0 deletions pythonforandroid/recipes/cppy/__init__.py
Original file line number Diff line number Diff line change
@@ -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()
25 changes: 0 additions & 25 deletions pythonforandroid/recipes/enaml/0001-Update-setup.py.patch

This file was deleted.

5 changes: 2 additions & 3 deletions pythonforandroid/recipes/enaml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']


Expand Down
8 changes: 4 additions & 4 deletions pythonforandroid/recipes/kiwisolver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Loading