From 1eff6352233105e3aa0b25382ba7dbf8d2459ba3 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 21 Jun 2014 14:50:09 +0300 Subject: [PATCH] os: Depend on _libc. --- os/metadata.txt | 3 ++- os/os/__init__.py | 3 ++- os/setup.py | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/os/metadata.txt b/os/metadata.txt index 26f9b09f..6480f592 100644 --- a/os/metadata.txt +++ b/os/metadata.txt @@ -1,4 +1,5 @@ srctype = micropython-lib type = package -version = 0.1.1 +version = 0.1.2 author = Paul Sokolovsky +depends = libc diff --git a/os/os/__init__.py b/os/os/__init__.py index 23311df9..10a00e2b 100644 --- a/os/os/__init__.py +++ b/os/os/__init__.py @@ -3,13 +3,14 @@ import array import struct import errno import stat as stat_ +import _libc try: from _os import * except: pass -libc = ffi.open("libc.so.6") +libc = _libc.get() errno_ = libc.var("i", "errno") mkdir_ = libc.func("i", "mkdir", "si") diff --git a/os/setup.py b/os/setup.py index 9e2782ce..4afb6894 100644 --- a/os/setup.py +++ b/os/setup.py @@ -6,7 +6,7 @@ from setuptools import setup setup(name='micropython-os', - version='0.1.1', + version='0.1.2', description='os 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-os', maintainer='MicroPython Developers', maintainer_email='micro-python@googlegroups.com', license='MIT', - packages=['os']) + packages=['os'], + install_requires=['micropython-libc'])