-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recipes updates with CrystaX/Python3 support
Adds CrystaX/Python3 support to 9 recipes: - cffi: fixes build in both Python2 and Python3 - decorator: updates version and adds python3crystax support - idna: updates version - pycryptodome: fixes version string & adds python3crystax support - python3crystax: adds python3crystax support - pyyaml: updates version & drops host python via target python - requests: adds python3crystax support - scrypt: fixes version & adds python3crystax support - secp256k1: adds python3crystax support These recipes were tested with CrystaX/Python3 in https://github.com/AndreMiras/EtherollApp See last `buildozer android debug` build success: https://travis-ci.org/AndreMiras/EtherollApp/jobs/386381704
- Loading branch information
1 parent
5a3ed06
commit ccd5b59
Showing
10 changed files
with
96 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
import os | ||
from pythonforandroid.recipe import PythonRecipe | ||
|
||
|
||
# TODO: CompiledComponentsPythonRecipe | ||
class Pysha3Recipe(PythonRecipe): | ||
version = '1.0.2' | ||
url = 'https://github.com/tiran/pysha3/archive/{version}.tar.gz' | ||
depends = [('python2', 'python3crystax'), 'setuptools'] | ||
|
||
depends = ['python2', 'setuptools'] | ||
def get_recipe_env(self, arch=None, with_flags_in_cc=True): | ||
env = super(Pysha3Recipe, self).get_recipe_env(arch, with_flags_in_cc) | ||
# sets linker to use the correct gcc (cross compiler) | ||
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions' | ||
# CFLAGS may only be used to specify C compiler flags, for macro definitions use CPPFLAGS | ||
env['CPPFLAGS'] = env['CFLAGS'] + ' -I{}/sources/python/3.5/include/python/'.format(self.ctx.ndk_dir) | ||
env['CFLAGS'] = '' | ||
# LDFLAGS may only be used to specify linker flags, for libraries use LIBS | ||
env['LDFLAGS'] = env['LDFLAGS'].replace('-lm', '').replace('-lcrystax', '') | ||
env['LDFLAGS'] += ' -L{}'.format(os.path.join(self.ctx.bootstrap.build_dir, 'libs', arch.arch)) | ||
env['LIBS'] = ' -lm' | ||
if self.ctx.ndk == 'crystax': | ||
env['LIBS'] += ' -lcrystax -lpython{}m'.format(self.ctx.python_recipe.version[0:3]) | ||
env['LDSHARED'] += env['LIBS'] | ||
return env | ||
|
||
|
||
recipe = Pysha3Recipe() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters