From 2fb828177369a8b020d61f92946339b2ad9cdf08 Mon Sep 17 00:00:00 2001 From: Thomas Strub Date: Tue, 5 Feb 2019 22:55:05 +0100 Subject: [PATCH 1/8] update to add dependency on python3 to opencv recipe numpy/opencv fails with latest p4a at runtime (import) #1678 --- pythonforandroid/recipes/opencv/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/opencv/__init__.py b/pythonforandroid/recipes/opencv/__init__.py index 6932bc225c..5680dfe73c 100644 --- a/pythonforandroid/recipes/opencv/__init__.py +++ b/pythonforandroid/recipes/opencv/__init__.py @@ -17,7 +17,7 @@ class OpenCVRecipe(NDKRecipe): ''' version = '4.0.1' url = 'https://github.com/opencv/opencv/archive/{version}.zip' - depends = ['numpy'] + depends = ['numpy', ('python2', 'python3', 'python3crystax')] patches = ['patches/p4a_build.patch'] generated_libraries = [ 'libopencv_features2d.so', From b8c55dc0f34e65d82dd79495b6e86d89e4723220 Mon Sep 17 00:00:00 2001 From: Thomas Strub Date: Tue, 5 Feb 2019 23:10:26 +0100 Subject: [PATCH 2/8] Further recipe changes for python3 #1514 --- pythonforandroid/recipes/cherrypy/__init__.py | 2 +- pythonforandroid/recipes/feedparser/__init__.py | 2 +- pythonforandroid/recipes/kiwisolver/__init__.py | 2 +- pythonforandroid/recipes/libtribler/__init__.py | 2 ++ pythonforandroid/recipes/openssl/__init__.py | 5 +++++ pythonforandroid/recipes/ruamel.yaml/__init__.py | 2 +- pythonforandroid/recipes/zope/__init__.py | 2 +- 7 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pythonforandroid/recipes/cherrypy/__init__.py b/pythonforandroid/recipes/cherrypy/__init__.py index f4567b2e1c..1fc3a3e405 100644 --- a/pythonforandroid/recipes/cherrypy/__init__.py +++ b/pythonforandroid/recipes/cherrypy/__init__.py @@ -4,7 +4,7 @@ class CherryPyRecipe(PythonRecipe): version = '5.1.0' url = 'https://bitbucket.org/cherrypy/cherrypy/get/{version}.tar.gz' - depends = ['hostpython2', 'setuptools'] + depends = [('hostpython2', 'hostpython3'), 'setuptools'] site_packages_name = 'cherrypy' call_hostpython_via_targetpython = False diff --git a/pythonforandroid/recipes/feedparser/__init__.py b/pythonforandroid/recipes/feedparser/__init__.py index 8842ca6a89..78b03724b1 100644 --- a/pythonforandroid/recipes/feedparser/__init__.py +++ b/pythonforandroid/recipes/feedparser/__init__.py @@ -4,7 +4,7 @@ class FeedparserPyRecipe(PythonRecipe): version = '5.2.1' url = 'https://github.com/kurtmckee/feedparser/archive/{version}.tar.gz' - depends = [('hostpython2', 'python3crystax'), 'setuptools'] + depends = [('hostpython2', 'hostpython3crystax', 'hostpython3'), 'setuptools'] site_packages_name = 'feedparser' call_hostpython_via_targetpython = False diff --git a/pythonforandroid/recipes/kiwisolver/__init__.py b/pythonforandroid/recipes/kiwisolver/__init__.py index 052f88e1bb..ae6fa175d7 100644 --- a/pythonforandroid/recipes/kiwisolver/__init__.py +++ b/pythonforandroid/recipes/kiwisolver/__init__.py @@ -5,7 +5,7 @@ class KiwiSolverRecipe(CppCompiledComponentsPythonRecipe): site_packages_name = 'kiwisolver' version = '0.1.3' url = 'https://github.com/nucleic/kiwi/archive/master.zip' - depends = ['python2', 'setuptools'] + depends = ['setuptools'] recipe = KiwiSolverRecipe() diff --git a/pythonforandroid/recipes/libtribler/__init__.py b/pythonforandroid/recipes/libtribler/__init__.py index 1abb696892..134ed9e33f 100644 --- a/pythonforandroid/recipes/libtribler/__init__.py +++ b/pythonforandroid/recipes/libtribler/__init__.py @@ -17,6 +17,8 @@ class LibTriblerRecipe(PythonRecipe): 'netifaces', 'openssl', 'pil', 'pycrypto', 'pyleveldb', 'twisted', ] + conflicts = ['python3'] + python_depends = ['chardet', 'cherrypy', 'configobj', 'decorator', 'feedparser', 'libnacl', 'pyasn1', 'requests', 'six', ] diff --git a/pythonforandroid/recipes/openssl/__init__.py b/pythonforandroid/recipes/openssl/__init__.py index f0da1feb1e..8bc3d0c06f 100644 --- a/pythonforandroid/recipes/openssl/__init__.py +++ b/pythonforandroid/recipes/openssl/__init__.py @@ -43,6 +43,9 @@ class OpenSSLRecipe(Recipe): ''' + + conflicts = ['python3'] + standard_version = '1.1' '''the major minor version used to link our recipes''' legacy_version = '1.0' @@ -59,6 +62,8 @@ class OpenSSLRecipe(Recipe): @property def use_legacy(self): + if not self.ctx.recipe_build_order: + return False return any([i for i in ('python2legacy', 'python3crystax') if i in self.ctx.recipe_build_order]) diff --git a/pythonforandroid/recipes/ruamel.yaml/__init__.py b/pythonforandroid/recipes/ruamel.yaml/__init__.py index 049a5f707f..16d77e220d 100644 --- a/pythonforandroid/recipes/ruamel.yaml/__init__.py +++ b/pythonforandroid/recipes/ruamel.yaml/__init__.py @@ -4,7 +4,7 @@ class RuamelYamlRecipe(PythonRecipe): version = '0.15.77' url = 'https://pypi.python.org/packages/source/r/ruamel.yaml/ruamel.yaml-{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'setuptools'] + depends = [('python2', 'python3crystax', 'python3'), 'setuptools'] site_packages_name = 'ruamel' call_hostpython_via_targetpython = False patches = ['disable-pip-req.patch'] diff --git a/pythonforandroid/recipes/zope/__init__.py b/pythonforandroid/recipes/zope/__init__.py index 45180a16f1..0e2c7fd1ae 100644 --- a/pythonforandroid/recipes/zope/__init__.py +++ b/pythonforandroid/recipes/zope/__init__.py @@ -8,7 +8,7 @@ class ZopeRecipe(PythonRecipe): version = '4.1.3' url = 'http://pypi.python.org/packages/source/z/zope.interface/zope.interface-{version}.tar.gz' - depends = ['python2'] + depends = [('python2', 'python3')] def get_recipe_env(self, arch): env = super(ZopeRecipe, self).get_recipe_env(arch) From e945e020d968486460389c17dcb700cee50c1116 Mon Sep 17 00:00:00 2001 From: strubbi77 Date: Wed, 6 Feb 2019 22:46:34 +0100 Subject: [PATCH 3/8] Update __init__.py Removed unnecessary hostpython* --- pythonforandroid/recipes/cherrypy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/cherrypy/__init__.py b/pythonforandroid/recipes/cherrypy/__init__.py index 1fc3a3e405..6d3844b19c 100644 --- a/pythonforandroid/recipes/cherrypy/__init__.py +++ b/pythonforandroid/recipes/cherrypy/__init__.py @@ -4,7 +4,7 @@ class CherryPyRecipe(PythonRecipe): version = '5.1.0' url = 'https://bitbucket.org/cherrypy/cherrypy/get/{version}.tar.gz' - depends = [('hostpython2', 'hostpython3'), 'setuptools'] + depends = ['setuptools'] site_packages_name = 'cherrypy' call_hostpython_via_targetpython = False From 2239638c5f66a27b64d542a37a855f37afcefe59 Mon Sep 17 00:00:00 2001 From: strubbi77 Date: Wed, 6 Feb 2019 22:46:53 +0100 Subject: [PATCH 4/8] Update __init__.py Removed unnecessary hostpython* --- pythonforandroid/recipes/feedparser/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/feedparser/__init__.py b/pythonforandroid/recipes/feedparser/__init__.py index 78b03724b1..cce88b9eeb 100644 --- a/pythonforandroid/recipes/feedparser/__init__.py +++ b/pythonforandroid/recipes/feedparser/__init__.py @@ -4,7 +4,7 @@ class FeedparserPyRecipe(PythonRecipe): version = '5.2.1' url = 'https://github.com/kurtmckee/feedparser/archive/{version}.tar.gz' - depends = [('hostpython2', 'hostpython3crystax', 'hostpython3'), 'setuptools'] + depends = ['setuptools'] site_packages_name = 'feedparser' call_hostpython_via_targetpython = False From b05785982997438b9954d025850569ba1254c379 Mon Sep 17 00:00:00 2001 From: strubbi77 Date: Wed, 6 Feb 2019 22:47:37 +0100 Subject: [PATCH 5/8] Update __init__.py Removed unnecessary python* --- pythonforandroid/recipes/ruamel.yaml/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/ruamel.yaml/__init__.py b/pythonforandroid/recipes/ruamel.yaml/__init__.py index 16d77e220d..5965afa354 100644 --- a/pythonforandroid/recipes/ruamel.yaml/__init__.py +++ b/pythonforandroid/recipes/ruamel.yaml/__init__.py @@ -4,7 +4,7 @@ class RuamelYamlRecipe(PythonRecipe): version = '0.15.77' url = 'https://pypi.python.org/packages/source/r/ruamel.yaml/ruamel.yaml-{version}.tar.gz' - depends = [('python2', 'python3crystax', 'python3'), 'setuptools'] + depends = ['setuptools'] site_packages_name = 'ruamel' call_hostpython_via_targetpython = False patches = ['disable-pip-req.patch'] From 165c55ea9279e4c52c33674ab662df3d262fc778 Mon Sep 17 00:00:00 2001 From: strubbi77 Date: Wed, 6 Feb 2019 22:48:10 +0100 Subject: [PATCH 6/8] Update __init__.py Removed unnecessary python* --- pythonforandroid/recipes/zope/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/zope/__init__.py b/pythonforandroid/recipes/zope/__init__.py index 0e2c7fd1ae..579a7600c5 100644 --- a/pythonforandroid/recipes/zope/__init__.py +++ b/pythonforandroid/recipes/zope/__init__.py @@ -8,7 +8,7 @@ class ZopeRecipe(PythonRecipe): version = '4.1.3' url = 'http://pypi.python.org/packages/source/z/zope.interface/zope.interface-{version}.tar.gz' - depends = [('python2', 'python3')] + depends = [] def get_recipe_env(self, arch): env = super(ZopeRecipe, self).get_recipe_env(arch) From 635c0a64f521734eadc843654c276f1dedc6274f Mon Sep 17 00:00:00 2001 From: strubbi77 Date: Wed, 6 Feb 2019 23:49:01 +0100 Subject: [PATCH 7/8] Update __init__.py Removed conflicts because it was wrong --- pythonforandroid/recipes/openssl/__init__.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/pythonforandroid/recipes/openssl/__init__.py b/pythonforandroid/recipes/openssl/__init__.py index 8bc3d0c06f..3a9505f425 100644 --- a/pythonforandroid/recipes/openssl/__init__.py +++ b/pythonforandroid/recipes/openssl/__init__.py @@ -43,9 +43,6 @@ class OpenSSLRecipe(Recipe): ''' - - conflicts = ['python3'] - standard_version = '1.1' '''the major minor version used to link our recipes''' legacy_version = '1.0' From 47b4107569364c1c73e8fffc4eded5537b9e8e95 Mon Sep 17 00:00:00 2001 From: strubbi77 Date: Thu, 7 Feb 2019 12:23:03 +0100 Subject: [PATCH 8/8] Update __init__.py --- pythonforandroid/recipes/opencv/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/opencv/__init__.py b/pythonforandroid/recipes/opencv/__init__.py index 5680dfe73c..6932bc225c 100644 --- a/pythonforandroid/recipes/opencv/__init__.py +++ b/pythonforandroid/recipes/opencv/__init__.py @@ -17,7 +17,7 @@ class OpenCVRecipe(NDKRecipe): ''' version = '4.0.1' url = 'https://github.com/opencv/opencv/archive/{version}.zip' - depends = ['numpy', ('python2', 'python3', 'python3crystax')] + depends = ['numpy'] patches = ['patches/p4a_build.patch'] generated_libraries = [ 'libopencv_features2d.so',