Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
recursive-include uringloop *
include _ffi_build.py
recursive-include uringloop *.py *.pyi
include uringloop/py.typed
exclude uringloop/_liburing.c
exclude uringloop/_liburing.o
exclude uringloop/_liburing*.so
recursive-exclude uringloop/__pycache__ *
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ uv add uringloop
pip install uringloop
```

Only a source distribution is published, so the CFFI extension is compiled during installation; the liburing development headers (see Requirements) and a C compiler must be present.

## Quick Start

Pass the loop factory to `asyncio.run` to use the io_uring-based event loop:
Expand Down
5 changes: 3 additions & 2 deletions ffi.py → _ffi_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
int io_uring_wait_cqe_timeout(struct io_uring *ring, struct io_uring_cqe **cqe_ptr, struct __kernel_timespec *ts);
""")

# TODO: remove this trick, i feel it is not a official way.
if __name__ == "__cffi__" or __name__ == "__main__":
# for manual development builds; setuptools' cffi_modules integration only
# needs the ffibuilder attribute and drives the compilation itself
if __name__ == "__main__":
ffibuilder.compile(verbose=True)
19 changes: 14 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
[project]
name = "uringloop"
version = "0.1.0"
description = ""
description = "An io_uring-based proactor event loop for asyncio"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.12"
dependencies = [
"cffi>=1.17.1",
"setuptools>=78.1.0",
]
keywords = ["asyncio", "io_uring", "liburing", "event loop", "proactor", "linux"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Framework :: AsyncIO",
"Topic :: System :: Networking",
]

[project.urls]
Expand Down Expand Up @@ -80,11 +91,9 @@ order-by-type = true

# setuptools
[build-system]
requires = ["setuptools>=78", "cffi>=1.17.1", "wheel"]
requires = ["setuptools>=78", "cffi>=1.17.1"]
build-backend = "setuptools.build_meta"
package-dir = {"" = "."}

[tool.setuptools]
packages = ["uringloop"]
include-package-data = true
py-modules = ["ffi"]
6 changes: 1 addition & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
from setuptools import setup


setup(
cffi_modules=["ffi.py:ffibuilder"],
py_modules=["ffi"],
include_package_data=True
)
setup(cffi_modules=["_ffi_build.py:ffibuilder"])
Loading
Loading