Skip to content

Commit 74fb8e5

Browse files
tomgold182AndreMiras
authored andcommitted
added a recipe for bcrypt library (#2035)
closes #1910
1 parent 2610330 commit 74fb8e5

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from pythonforandroid.recipe import CompiledComponentsPythonRecipe, Recipe
2+
3+
4+
class BCryptRecipe(CompiledComponentsPythonRecipe):
5+
name = 'bcrypt'
6+
version = '3.1.7'
7+
url = 'https://github.com/pyca/bcrypt/archive/{version}.tar.gz'
8+
depends = ['openssl', 'cffi']
9+
call_hostpython_via_targetpython = False
10+
11+
def get_recipe_env(self, arch):
12+
env = super(BCryptRecipe, self).get_recipe_env(arch)
13+
14+
openssl_recipe = Recipe.get_recipe('openssl', self.ctx)
15+
env['CFLAGS'] += openssl_recipe.include_flags(arch)
16+
env['LDFLAGS'] += openssl_recipe.link_dirs_flags(arch)
17+
env['LIBS'] = openssl_recipe.link_libs_flags()
18+
19+
return env
20+
21+
22+
recipe = BCryptRecipe()

0 commit comments

Comments
 (0)