From e4b67a0d3250a34e9d9bfe8bba81c813843cc9f8 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 5 Jun 2015 13:17:37 +0000 Subject: [PATCH] re-pcre: Use ffilib to load libpcre shared library. --- re-pcre/metadata.txt | 1 + re-pcre/re.py | 4 ++-- re-pcre/setup.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/re-pcre/metadata.txt b/re-pcre/metadata.txt index e432d6d3..869363fc 100644 --- a/re-pcre/metadata.txt +++ b/re-pcre/metadata.txt @@ -3,3 +3,4 @@ srctype = micropython-lib type = module version = 0.2 author = Paul Sokolovsky +depends = ffilib diff --git a/re-pcre/re.py b/re-pcre/re.py index d9eaea3d..f1408654 100644 --- a/re-pcre/re.py +++ b/re-pcre/re.py @@ -1,8 +1,8 @@ -import ffi +import ffilib import array -pcre = ffi.open("libpcre.so.3") +pcre = ffilib.open("libpcre") # pcre *pcre_compile(const char *pattern, int options, # const char **errptr, int *erroffset, diff --git a/re-pcre/setup.py b/re-pcre/setup.py index 1b991e32..6b54a441 100644 --- a/re-pcre/setup.py +++ b/re-pcre/setup.py @@ -15,4 +15,5 @@ setup(name='micropython-re-pcre', maintainer='MicroPython Developers', maintainer_email='micro-python@googlegroups.com', license='MIT', - py_modules=['re']) + py_modules=['re'], + install_requires=['micropython-ffilib'])