6
6
class ApswRecipe (PythonRecipe ):
7
7
version = '3.15.0-r1'
8
8
url = 'https://github.com/rogerbinns/apsw/archive/{version}.tar.gz'
9
- depends = ['sqlite3' , 'hostpython2 ' , 'python2' , 'setuptools' ]
9
+ depends = ['sqlite3' , ( 'python2 ' , 'python3' ) , 'setuptools' ]
10
10
call_hostpython_via_targetpython = False
11
11
site_packages_name = 'apsw'
12
12
@@ -24,14 +24,10 @@ def build_arch(self, arch):
24
24
25
25
def get_recipe_env (self , arch ):
26
26
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
+ sqlite_recipe = self .get_recipe ('sqlite3' , self .ctx )
28
+ env ['CFLAGS' ] += ' -I' + sqlite_recipe .get_build_dir (arch .arch )
29
+ env ['LDFLAGS' ] += ' -L' + sqlite_recipe .get_lib_dir (arch )
30
+ env ['LIBS' ] = env .get ('LIBS' , '' ) + ' -lsqlite3'
35
31
return env
36
32
37
33
0 commit comments