Skip to content

Commit cbc5be4

Browse files
authored
Merge pull request kivy#1080 from AndreMiras/feature/ethereum_related_recipes_fixes
Various Ethereum related recipes fixes
2 parents 1a4a2c3 + 909f5b2 commit cbc5be4

File tree

5 files changed

+49
-6
lines changed

5 files changed

+49
-6
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from pythonforandroid.recipe import PythonRecipe
2+
3+
4+
class Pbkdf2Recipe(PythonRecipe):
5+
6+
# TODO: version
7+
url = 'https://github.com/dlitz/python-pbkdf2/archive/master.zip'
8+
9+
depends = ['setuptools']
10+
11+
12+
recipe = Pbkdf2Recipe()

pythonforandroid/recipes/pycryptodome/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class PycryptodomeRecipe(PythonRecipe):
55
version = 'v3.4.6'
66
url = 'https://github.com/Legrandin/pycryptodome/archive/{version}.tar.gz'
77

8-
depends = ['python2', 'setuptools']
8+
depends = ['python2', 'setuptools', 'cffi']
99

1010

1111
recipe = PycryptodomeRecipe()

pythonforandroid/recipes/secp256k1/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
from os.path import join
2-
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
2+
from pythonforandroid.recipe import PythonRecipe
33

44

5-
class Secp256k1Recipe(CompiledComponentsPythonRecipe):
5+
class Secp256k1Recipe(PythonRecipe):
66

77
url = 'https://github.com/ludbb/secp256k1-py/archive/master.zip'
88

99
call_hostpython_via_targetpython = False
1010

1111
depends = [
1212
'openssl', 'hostpython2', 'python2', 'setuptools',
13-
'libffi', 'cffi', 'libsecp256k1']
13+
'libffi', 'cffi', 'libffi', 'libsecp256k1']
1414

15-
patches = ["cross_compile.patch", "pkg-config.patch", "find_lib.patch"]
15+
patches = [
16+
"cross_compile.patch", "drop_setup_requires.patch",
17+
"pkg-config.patch", "find_lib.patch", "no-download.patch"]
1618

1719
def get_recipe_env(self, arch=None):
1820
env = super(Secp256k1Recipe, self).get_recipe_env(arch)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/setup.py b/setup.py
2+
index bba4bce..5ea0228 100644
3+
--- a/setup.py
4+
+++ b/setup.py
5+
@@ -55,6 +55,8 @@ except OSError:
6+
7+
8+
def download_library(command):
9+
+ # we will use the custom libsecp256k1 recipe
10+
+ return
11+
if command.dry_run:
12+
return
13+
libdir = absolute("libsecp256k1")

pythonforandroid/recipes/secp256k1/pkg-config.patch

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1+
diff --git a/setup.py b/setup.py
2+
index bba4bce..609481c 100644
3+
--- a/setup.py
4+
+++ b/setup.py
5+
@@ -48,10 +48,7 @@ if [int(i) for i in setuptools_version.split('.')] < [3, 3]:
6+
try:
7+
subprocess.check_call(['pkg-config', '--version'])
8+
except OSError:
9+
- raise SystemExit(
10+
- "'pkg-config' is required to install this package. "
11+
- "Please see the README for details."
12+
- )
13+
+ pass
14+
15+
16+
def download_library(command):
117
diff --git a/setup_support.py b/setup_support.py
2-
index 68a2a7f..42e85a3 100644
18+
index 68a2a7f..ccbafac 100644
319
--- a/setup_support.py
420
+++ b/setup_support.py
521
@@ -40,6 +40,7 @@ def absolute(*paths):

0 commit comments

Comments
 (0)