Skip to content

Commit 1eff635

Browse files
committed
os: Depend on _libc.
1 parent a6dee73 commit 1eff635

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

os/metadata.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
srctype = micropython-lib
22
type = package
3-
version = 0.1.1
3+
version = 0.1.2
44
author = Paul Sokolovsky
5+
depends = libc

os/os/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
import struct
44
import errno
55
import stat as stat_
6+
import _libc
67
try:
78
from _os import *
89
except:
910
pass
1011

1112

12-
libc = ffi.open("libc.so.6")
13+
libc = _libc.get()
1314

1415
errno_ = libc.var("i", "errno")
1516
mkdir_ = libc.func("i", "mkdir", "si")

os/setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
setup(name='micropython-os',
9-
version='0.1.1',
9+
version='0.1.2',
1010
description='os module for MicroPython',
1111
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.",
1212
url='https://github.com/micropython/micropython/issues/405',
@@ -15,4 +15,5 @@
1515
maintainer='MicroPython Developers',
1616
maintainer_email='micro-python@googlegroups.com',
1717
license='MIT',
18-
packages=['os'])
18+
packages=['os'],
19+
install_requires=['micropython-libc'])

0 commit comments

Comments
 (0)