Skip to content

Commit

Permalink
fix quotes;
Browse files Browse the repository at this point in the history
try other route with patch;
  • Loading branch information
brussee committed Apr 12, 2016
1 parent 07cc5b7 commit 69204d7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pythonforandroid/recipes/python2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ def do_python_build(self, arch):
' -L$(SSL) -lssl -lcrypto',
'\n'])
if 'sqlite3' in self.ctx.recipe_build_order:
#self.apply_patch('patches/enable-sqlite3.patch', arch.arch)
#sqlite3_root = Recipe.get_recipe('sqlite3', self.ctx).get_build_dir(arch.arch)
#shprint(sh.sed, '-i', 's#SQLITE_RECIPE_INC#{}#'.format(sqlite3_root),
# join(self.get_build_dir(arch.arch), 'setup.py'))
#shprint(sh.sed, '-i', 's#SQLITE_RECIPE_LIB#{}#'.format(
# join(sqlite3_root, 'obj/local', arch.arch)),
# join(self.get_build_dir(arch.arch), 'setup.py'))

file.writelines([
'SQLITE=' + Recipe.get_recipe('sqlite3', self.ctx).get_build_dir(arch.arch) + '\n',
'_sqlite3',
Expand All @@ -117,11 +125,12 @@ def do_python_build(self, arch):
' _sqlite/util.c',
' _sqlite/row.c',
' -DSQLITE_ENABLE_FTS4',
#' -DMODULE_NAME _sqlite3',
' -D\'MODULE_NAME="_sqlite3"\'',
' -I$(SQLITE)',
' -L$(SQLITE)/obj/local/' + arch.arch + ' -lsqlite3',
#' -o_sqlite/',
'\n'])

file.close()

configure = sh.Command('./configure')
Expand Down
12 changes: 12 additions & 0 deletions pythonforandroid/recipes/python2/patches/enable-sqlite3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- python2/setup.py 2016-03-22 16:57:59.263200138 +0100
+++ python2-patch/setup.py 2016-03-22 17:15:23.166433004 +0100
@@ -1024,7 +1024,8 @@

# We hunt for #define SQLITE_VERSION "n.n.n"
# We need to find >= sqlite version 3.0.8
- sqlite_incdir = sqlite_libdir = None
+ sqlite_incdir = 'SQLITE_RECIPE_INC'
+ sqlite_libdir = 'SQLITE_RECIPE_LIB'
sqlite_inc_paths = [ '/usr/include',
'/usr/include/sqlite',
'/usr/include/sqlite3',

0 comments on commit 69204d7

Please sign in to comment.