Skip to content

Commit 9a6db1a

Browse files
committed
Remove unneeded flags and grants python3 compatibility for the apsw recipe
The flags that we remove are already set in base class, so no need to set in here.
1 parent 8493d5e commit 9a6db1a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

pythonforandroid/recipes/apsw/__init__.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class ApswRecipe(PythonRecipe):
77
version = '3.15.0-r1'
88
url = 'https://github.com/rogerbinns/apsw/archive/{version}.tar.gz'
9-
depends = ['sqlite3', 'hostpython2', 'python2', 'setuptools']
9+
depends = ['sqlite3', ('python2', 'python3'), 'setuptools']
1010
call_hostpython_via_targetpython = False
1111
site_packages_name = 'apsw'
1212

@@ -24,14 +24,8 @@ def build_arch(self, arch):
2424

2525
def get_recipe_env(self, arch):
2626
env = super(ApswRecipe, self).get_recipe_env(arch)
27-
env['PYTHON_ROOT'] = self.ctx.get_python_install_dir()
28-
env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python2.7' + \
29-
' -I' + self.get_recipe('sqlite3', self.ctx).get_build_dir(arch.arch)
30-
# Set linker to use the correct gcc
31-
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions'
32-
env['LDFLAGS'] += ' -L' + env['PYTHON_ROOT'] + '/lib' + \
33-
' -lpython2.7' + \
34-
' -lsqlite3'
27+
env['CFLAGS'] += ' -I' + self.get_recipe('sqlite3', self.ctx).get_build_dir(arch.arch)
28+
env['LDFLAGS'] += ' -lsqlite3'
3529
return env
3630

3731

0 commit comments

Comments
 (0)