kopia lustrzana https://github.com/micropython/micropython-lib
select: Switch to ffilib.
rodzic
23de8c0a22
commit
daaffd7edb
|
@ -1,5 +1,5 @@
|
||||||
srctype = micropython-lib
|
srctype = micropython-lib
|
||||||
type = module
|
type = module
|
||||||
version = 0.1.5
|
version = 0.1.6
|
||||||
author = Paul Sokolovsky
|
author = Paul Sokolovsky
|
||||||
depends = os, libc
|
depends = os, ffilib
|
||||||
|
|
|
@ -2,10 +2,10 @@ import ffi
|
||||||
import ustruct as struct
|
import ustruct as struct
|
||||||
import os
|
import os
|
||||||
import errno
|
import errno
|
||||||
import _libc
|
import ffilib
|
||||||
|
|
||||||
|
|
||||||
libc = _libc.get()
|
libc = ffilib.libc()
|
||||||
|
|
||||||
#int epoll_create(int size);
|
#int epoll_create(int size);
|
||||||
epoll_create = libc.func("i", "epoll_create", "i")
|
epoll_create = libc.func("i", "epoll_create", "i")
|
||||||
|
@ -32,7 +32,7 @@ EPOLL_CTL_MOD = 3
|
||||||
# Until uctypes module can assign native struct offset, use dirty hack
|
# Until uctypes module can assign native struct offset, use dirty hack
|
||||||
# below.
|
# below.
|
||||||
# TODO: Get rid of all this dirtiness, move it on C side
|
# TODO: Get rid of all this dirtiness, move it on C side
|
||||||
if _libc.bitness > 32:
|
if ffilib.bitness > 32:
|
||||||
# On x86_64, epoll_event is packed struct
|
# On x86_64, epoll_event is packed struct
|
||||||
epoll_event = "<IO"
|
epoll_event = "<IO"
|
||||||
elif struct.calcsize("IQ") == 12:
|
elif struct.calcsize("IQ") == 12:
|
||||||
|
|
|
@ -6,7 +6,7 @@ from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
setup(name='micropython-select',
|
setup(name='micropython-select',
|
||||||
version='0.1.5',
|
version='0.1.6',
|
||||||
description='select module for MicroPython',
|
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.",
|
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',
|
url='https://github.com/micropython/micropython/issues/405',
|
||||||
|
@ -16,4 +16,4 @@ setup(name='micropython-select',
|
||||||
maintainer_email='micro-python@googlegroups.com',
|
maintainer_email='micro-python@googlegroups.com',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
py_modules=['select'],
|
py_modules=['select'],
|
||||||
install_requires=['micropython-os', 'micropython-libc'])
|
install_requires=['micropython-os', 'micropython-ffilib'])
|
||||||
|
|
Ładowanie…
Reference in New Issue