Skip to content

Commit 8b93b7b

Browse files
committed
[recipe-lib] Make libsecp256k1 a library recipe and ...
also make the imports from the right module
1 parent 52bb3b2 commit 8b93b7b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pythonforandroid/recipes/libsecp256k1/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from pythonforandroid.toolchain import shprint, current_directory
1+
from pythonforandroid.logger import shprint
2+
from pythonforandroid.util import current_directory
23
from pythonforandroid.recipe import Recipe
34
from multiprocessing import cpu_count
45
from os.path import exists
@@ -7,10 +8,11 @@
78

89
class LibSecp256k1Recipe(Recipe):
910

11+
built_libraries = {'libsecp256k1.so': '.libs'}
12+
1013
url = 'https://github.com/bitcoin-core/secp256k1/archive/master.zip'
1114

12-
def build_arch(self, arch):
13-
super(LibSecp256k1Recipe, self).build_arch(arch)
15+
def do_build_libs(self, arch):
1416
env = self.get_recipe_env(arch)
1517
with current_directory(self.get_build_dir(arch.arch)):
1618
if not exists('configure'):
@@ -25,8 +27,6 @@ def build_arch(self, arch):
2527
'--enable-module-ecdh',
2628
_env=env)
2729
shprint(sh.make, '-j' + str(cpu_count()), _env=env)
28-
libs = ['.libs/libsecp256k1.so']
29-
self.install_libs(arch, *libs)
3030

3131

3232
recipe = LibSecp256k1Recipe()

0 commit comments

Comments
 (0)