Skip to content

Commit c21de6e

Browse files
committed
add recipe for groestlcoin_hash module
This recipe depends on python3crystax, and has only been tested with python3.6 crystax, but should work with 3.5 too.
1 parent 8fed863 commit c21de6e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from pythonforandroid.recipe import CythonRecipe
2+
import os
3+
4+
5+
class groestlcoin_hashRecipe(CythonRecipe):
6+
version = '1.0.1'
7+
url = 'https://pypi.python.org/packages/source/g/groestlcoin_hash/groestlcoin_hash-{version}.tar.gz' # noqa
8+
depends = ['python3crystax']
9+
call_hostpython_via_targetpython = True
10+
cythonize = False
11+
12+
def get_recipe_env(self, arch):
13+
# Overriding the original method because we need to add the
14+
# libpythonX.Y location to LDFLAGS to be able to link against it
15+
# maybe this should be done in the super method and benefit
16+
# other recipes instead?
17+
env = super(groestlcoin_hashRecipe, self).get_recipe_env(arch)
18+
ndk_dir = self.ctx.ndk_dir
19+
python_version = '.'.join(self.ctx.python_recipe.version.split('.')[:2])
20+
ndk_path = os.path.join(
21+
ndk_dir, 'sources', 'python', python_version, 'libs', arch.arch
22+
)
23+
env['LDFLAGS'] = ' -L {}'.format(ndk_path) + env['LDFLAGS']
24+
return env
25+
26+
27+
recipe = groestlcoin_hashRecipe()

0 commit comments

Comments
 (0)