Skip to content

Commit 23361cb

Browse files
authored
Merge pull request #1554 from opacam/python-core-pysha3
[CORE UPDATE - PART XIII] Pysha3 for both versions of python
2 parents 45a3d8a + 28c9b47 commit 23361cb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pythonforandroid/recipes/pysha3/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
class Pysha3Recipe(PythonRecipe):
77
version = '1.0.2'
88
url = 'https://github.com/tiran/pysha3/archive/{version}.tar.gz'
9-
depends = [('python2', 'python3crystax'), 'setuptools']
9+
depends = ['setuptools']
10+
call_hostpython_via_targetpython = False
1011

1112
def get_recipe_env(self, arch=None, with_flags_in_cc=True):
1213
env = super(Pysha3Recipe, self).get_recipe_env(arch, with_flags_in_cc)
13-
# sets linker to use the correct gcc (cross compiler)
14-
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions'
1514
# CFLAGS may only be used to specify C compiler flags, for macro definitions use CPPFLAGS
16-
env['CPPFLAGS'] = env['CFLAGS'] + ' -I{}/sources/python/3.5/include/python/'.format(self.ctx.ndk_dir)
15+
env['CPPFLAGS'] = env['CFLAGS']
16+
if self.ctx.ndk == 'crystax':
17+
env['CPPFLAGS'] += ' -I{}/sources/python/{}/include/python/'.format(
18+
self.ctx.ndk_dir, self.ctx.python_recipe.version[0:3])
1719
env['CFLAGS'] = ''
1820
# LDFLAGS may only be used to specify linker flags, for libraries use LIBS
1921
env['LDFLAGS'] = env['LDFLAGS'].replace('-lm', '').replace('-lcrystax', '')

0 commit comments

Comments
 (0)