diff --git a/sqlite3/metadata.txt b/sqlite3/metadata.txt index d2e1fd37..d0e748b2 100644 --- a/sqlite3/metadata.txt +++ b/sqlite3/metadata.txt @@ -1,4 +1,5 @@ srctype = micropython-lib type = module -version = 0.2.1 +version = 0.2.2 author = Paul Sokolovsky +depends = ffilib diff --git a/sqlite3/setup.py b/sqlite3/setup.py index 2aa62a90..14586f81 100644 --- a/sqlite3/setup.py +++ b/sqlite3/setup.py @@ -6,7 +6,7 @@ from setuptools import setup setup(name='micropython-sqlite3', - version='0.2.1', + version='0.2.2', description='sqlite3 module for MicroPython', long_description="This is a module reimplemented specifically for MicroPython standard library,\nwith efficient and lean design in mind. Note that this module is likely work\nin progress and likely supports just a subset of CPython's corresponding\nmodule. Please help with the development if you are interested in this\nmodule.", url='https://github.com/micropython/micropython/issues/405', @@ -15,4 +15,5 @@ setup(name='micropython-sqlite3', maintainer='MicroPython Developers', maintainer_email='micro-python@googlegroups.com', license='MIT', - py_modules=['sqlite3']) + py_modules=['sqlite3'], + install_requires=['micropython-ffilib']) diff --git a/sqlite3/sqlite3.py b/sqlite3/sqlite3.py index e2e4263d..bcd7c68b 100644 --- a/sqlite3/sqlite3.py +++ b/sqlite3/sqlite3.py @@ -1,7 +1,7 @@ -import ffi +import ffilib -sq3 = ffi.open("libsqlite3.so.0") +sq3 = ffilib.open("libsqlite3") sqlite3_open = sq3.func("i", "sqlite3_open", "sp") #int sqlite3_close(sqlite3*);