Skip to content

Commit e1bb75f

Browse files
committed
Update cryptography recipe and grants python3 support
In order to not have troubles with python3 we update most of the dependant recipes to the latest available versions.
1 parent 9485875 commit e1bb75f

File tree

6 files changed

+20
-12
lines changed

6 files changed

+20
-12
lines changed

pythonforandroid/recipes/cffi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class CffiRecipe(CompiledComponentsPythonRecipe):
1010
version = '1.11.5'
1111
url = 'https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz'
1212

13-
depends = [('python2', 'python3crystax'), 'setuptools', 'pycparser', 'libffi']
13+
depends = ['setuptools', 'pycparser', 'libffi']
1414

1515
patches = ['disable-pkg-config.patch']
1616

pythonforandroid/recipes/cryptography/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
class CryptographyRecipe(CompiledComponentsPythonRecipe):
55
name = 'cryptography'
6-
version = '2.3.1'
6+
version = '2.4.2'
77
url = 'https://github.com/pyca/cryptography/archive/{version}.tar.gz'
8-
depends = [('python2', 'python3crystax'), 'openssl', 'idna', 'asn1crypto',
9-
'six', 'setuptools', 'enum34', 'ipaddress', 'cffi']
8+
depends = ['openssl', 'idna', 'asn1crypto', 'six', 'setuptools',
9+
'enum34', 'ipaddress', 'cffi']
1010
call_hostpython_via_targetpython = False
1111

1212
def get_recipe_env(self, arch):

pythonforandroid/recipes/enum34/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,19 @@
44
class Enum34Recipe(PythonRecipe):
55
version = '1.1.3'
66
url = 'https://pypi.python.org/packages/source/e/enum34/enum34-{version}.tar.gz'
7-
depends = [('python2', 'python3crystax'), 'setuptools']
7+
depends = ['setuptools']
88
site_packages_name = 'enum'
99
call_hostpython_via_targetpython = False
1010

11+
def should_build(self, arch):
12+
if 'python3' in self.ctx.python_recipe.name:
13+
# Since python 3.6 the enum34 library is no longer compatible with
14+
# the standard library and it will cause errors, so we disable it
15+
# in favour of the internal module, but we still add python3 to
16+
# attribute `depends` because otherwise we will not be able to
17+
# build the cryptography recipe.
18+
return False
19+
return super(Enum34Recipe, self).should_build(arch)
20+
1121

1222
recipe = Enum34Recipe()

pythonforandroid/recipes/idna/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
class IdnaRecipe(PythonRecipe):
55
name = 'idna'
6-
version = '2.6'
6+
version = '2.8'
77
url = 'https://github.com/kjd/idna/archive/v{version}.tar.gz'
88

9-
depends = [('python2', 'python3crystax'), 'setuptools']
9+
depends = ['setuptools']
1010

1111
call_hostpython_via_targetpython = False
1212

pythonforandroid/recipes/ipaddress/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33

44
class IpaddressRecipe(PythonRecipe):
55
name = 'ipaddress'
6-
version = '1.0.16'
7-
url = 'https://pypi.python.org/packages/source/i/ipaddress/ipaddress-{version}.tar.gz'
8-
9-
depends = [('python2', 'python3crystax')]
6+
version = '1.0.22'
7+
url = 'https://github.com/phihag/ipaddress/archive/v{version}.tar.gz'
108

119

1210
recipe = IpaddressRecipe()

pythonforandroid/recipes/pycparser/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class PycparserRecipe(PythonRecipe):
66
version = '2.14'
77
url = 'https://pypi.python.org/packages/source/p/pycparser/pycparser-{version}.tar.gz'
88

9-
depends = [('python2', 'python3crystax'), 'setuptools']
9+
depends = ['setuptools']
1010

1111
call_hostpython_via_targetpython = False
1212

0 commit comments

Comments
 (0)