Skip to content

Commit

Permalink
added a recipe for bcrypt library (#2035)
Browse files Browse the repository at this point in the history
closes #1910
  • Loading branch information
tomgold182 authored and AndreMiras committed Dec 7, 2019
1 parent 2610330 commit 74fb8e5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pythonforandroid/recipes/bcrypt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from pythonforandroid.recipe import CompiledComponentsPythonRecipe, Recipe


class BCryptRecipe(CompiledComponentsPythonRecipe):
name = 'bcrypt'
version = '3.1.7'
url = 'https://github.com/pyca/bcrypt/archive/{version}.tar.gz'
depends = ['openssl', 'cffi']
call_hostpython_via_targetpython = False

def get_recipe_env(self, arch):
env = super(BCryptRecipe, self).get_recipe_env(arch)

openssl_recipe = Recipe.get_recipe('openssl', self.ctx)
env['CFLAGS'] += openssl_recipe.include_flags(arch)
env['LDFLAGS'] += openssl_recipe.link_dirs_flags(arch)
env['LIBS'] = openssl_recipe.link_libs_flags()

return env


recipe = BCryptRecipe()

0 comments on commit 74fb8e5

Please sign in to comment.