8b2694efb7
* fix build for openssl 1.1.1b required for sdk (cherry picked from commit aa49e3b2755b97b6331cdbbb89efc954de8d5977) * use js code from master * fix openssl recipe and tweak build (cherry picked from commit 6e94c27021c7bd7b1e880c2fc314850e36a5a38e) * remove unused build recipes (cherry picked from commit f5c0577bdb175bfc0990602936bbc9e2052e1f25)
36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
from pythonforandroid.recipe import CythonRecipe
|
|
from pythonforandroid.toolchain import current_directory, shprint
|
|
from os.path import join
|
|
import sh
|
|
|
|
|
|
class XedDSARecipe(CythonRecipe):
|
|
name = 'xeddsa'
|
|
version = '0.4.4'
|
|
url = 'https://pypi.python.org/packages/source/X/XEdDSA/XEdDSA-{version}.tar.gz'
|
|
depends = [
|
|
'setuptools',
|
|
'cffi',
|
|
'pynacl',
|
|
]
|
|
patches = ['remove_dependencies.patch']
|
|
call_hostpython_via_targetpython = False
|
|
|
|
def build_arch(self, arch):
|
|
with current_directory(join(self.get_build_dir(arch.arch))):
|
|
env = self.get_recipe_env(arch)
|
|
hostpython = sh.Command(self.ctx.hostpython)
|
|
shprint(
|
|
hostpython, 'ref10/build.py',
|
|
_env=env
|
|
)
|
|
python_version = self.ctx.python_recipe.version[0:3]
|
|
site_packages_dir = 'lib/python{python_version}/site-packages'.format(
|
|
python_version=python_version)
|
|
site_packages = join(self.ctx.get_python_install_dir(),
|
|
site_packages_dir)
|
|
shprint(sh.cp, '_crypto_sign.so', site_packages)
|
|
self.install_python_package(arch)
|
|
|
|
|
|
recipe = XedDSARecipe()
|