Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sqlite in python3 #64

Merged
merged 8 commits into from
Mar 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions python3x/GET
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,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