From d32312e2d82ed681bc9251888c92af2e8664468b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 21 Jun 2014 14:59:35 +0300 Subject: [PATCH] select: Depend on _libc. --- select/metadata.txt | 4 ++-- select/select.py | 3 ++- select/setup.py | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/select/metadata.txt b/select/metadata.txt index 1a785b47..bbcfa95b 100644 --- a/select/metadata.txt +++ b/select/metadata.txt @@ -1,5 +1,5 @@ srctype = micropython-lib type = module -version = 0.0.6 +version = 0.0.7 author = Paul Sokolovsky -depends = os +depends = os, libc diff --git a/select/select.py b/select/select.py index 516e4184..a689cce1 100644 --- a/select/select.py +++ b/select/select.py @@ -2,9 +2,10 @@ import ffi import struct import os import errno +import _libc -libc = ffi.open("libc.so.6") +libc = _libc.get() #int epoll_create(int size); epoll_create = libc.func("i", "epoll_create", "i") diff --git a/select/setup.py b/select/setup.py index 5b58fcd7..539131e0 100644 --- a/select/setup.py +++ b/select/setup.py @@ -6,7 +6,7 @@ from setuptools import setup setup(name='micropython-select', - version='0.0.6', + version='0.0.7', description='select 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', @@ -16,4 +16,4 @@ setup(name='micropython-select', maintainer_email='micro-python@googlegroups.com', license='MIT', py_modules=['select'], - install_requires=['micropython-os']) + install_requires=['micropython-os', 'micropython-libc'])