66class 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,10 @@ 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+ 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'
3531 return env
3632
3733
0 commit comments