Skip to content

Commit

Permalink
Merge pull request #64 from pshem/patch-3
Browse files Browse the repository at this point in the history
Fix sqlite in python3
  • Loading branch information
wkozaczuk committed Mar 11, 2019
2 parents 352c2e5 + 79abf2a commit 6a075f3
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions python3x/GET
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ then
echo "ERROR some libraries required by python might be missing"
exit 1
fi

#replace sqlite with a non-MREMAP version
cp $BASEDIR/../sqlite/libsqlite3.so.0 $ROOTFS/usr/lib/libsqlite3.so.0
}

main
5 changes: 5 additions & 0 deletions python3x/module.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
from osv.modules import api

#For a proper interactive python terminal
api.require('unknown-term')

#For sqlite3 and help()
api.require('sqlite')

default = api.run(cmdline="--env=TERM=unknown /python3")
6 changes: 3 additions & 3 deletions sqlite/GET
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/sh

YEAR=2013
VERSION=3080200
YEAR=2019
VERSION=3270200

mkdir upstream
cd upstream
wget -c http://www.sqlite.org/$YEAR/sqlite-amalgamation-$VERSION.zip
unzip -x sqlite-amalgamation-$VERSION.zip
cd -

cc -O2 -fPIC -Wall -shared -DHAVE_MREMAP=0 -o sqlite.so upstream/sqlite-amalgamation-$VERSION/*.c
cc -O2 -fPIC -Wall -shared -DHAVE_MREMAP=0 -o libsqlite3.so.0 upstream/sqlite-amalgamation-$VERSION/*.c
2 changes: 1 addition & 1 deletion sqlite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ upstream:

.PHONY: clean
clean:
rm -rf upstream *.so
rm -rf upstream *.so *.so.0
2 changes: 1 addition & 1 deletion sqlite/module.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from osv.modules import api

default = api.run("/tools/sqlite.so test.db")
default = api.run("/usr/lib/libsqlite3.so.0 test.db")
2 changes: 1 addition & 1 deletion sqlite/usr.manifest
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/tools/sqlite.so: ${MODULE_DIR}/sqlite.so
/usr/lib/libsqlite3.so.0: ${MODULE_DIR}/libsqlite3.so.0

0 comments on commit 6a075f3

Please sign in to comment.