-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build setup for both Windows and non-Windows.
First (rough) version. Tested for builds on Windows and on WSL. Not tested with CI yet.
- Loading branch information
Showing
4 changed files
with
389 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.PHONY: _default clean clean-libuv distclean compile debug docs test testinstalled release setup-build ci-clean | ||
|
||
|
||
PYTHON ?= python | ||
ROOT = $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) | ||
|
||
|
||
_default: compile | ||
|
||
|
||
clean: | ||
rm -fr dist/ doc/_build/ *.egg-info winloop/loop.*.pyd | ||
rm -fr winloop/*.c winloop/*.html winloop/*.so | ||
rm -fr winloop/handles/*.html winloop/includes/*.html | ||
find . -name '__pycache__' | xargs rm -rf | ||
|
||
|
||
ci-clean: clean | ||
rm -fr build/lib.* build/temp.* build/libuv | ||
|
||
|
||
clean-libuv: | ||
(cd vendor/libuv; git clean -dfX) | ||
|
||
|
||
distclean: clean clean-libuv | ||
rm -fr build/ | ||
|
||
|
||
setup-build: | ||
$(PYTHON) setup.py build_ext --inplace --cython-always | ||
|
||
|
||
compile: clean setup-build | ||
|
||
|
||
debug: clean | ||
$(PYTHON) setup.py build_ext --inplace --debug \ | ||
--cython-always \ | ||
--cython-annotate \ | ||
--cython-directives="linetrace=True" \ | ||
--define UVLOOP_DEBUG,CYTHON_TRACE,CYTHON_TRACE_NOGIL | ||
|
||
|
||
docs: | ||
$(PYTHON) setup.py build_ext --inplace build_sphinx | ||
|
||
|
||
test: | ||
PYTHONASYNCIODEBUG=1 $(PYTHON) -m unittest discover -v tests | ||
$(PYTHON) -m unittest discover -v tests | ||
|
||
|
||
testinstalled: | ||
cd "$${HOME}" && $(PYTHON) -m unittest discover -v $(ROOT)/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,78 @@ | ||
[build-system] | ||
[project] | ||
name = "winloop" | ||
description = "Windows version of uvloop" | ||
authors = [{name = "Vizonex"}] | ||
requires-python = '>=3.8.0' | ||
readme = "README.md" | ||
license = {text = "MIT License"} | ||
dynamic = ["version"] | ||
keywords = [ | ||
"asyncio", | ||
"networking", | ||
] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Framework :: AsyncIO", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: POSIX", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: Microsoft :: Windows", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Topic :: System :: Networking", | ||
] | ||
|
||
[project.urls] | ||
github = "https://github.com/Vizonex/Winloop" | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
# pycodestyle is a dependency of flake8, but it must be frozen because | ||
# their combination breaks too often | ||
# (example breakage: https://gitlab.com/pycqa/flake8/issues/427) | ||
'aiohttp>=3.8.1; python_version < "3.12"', | ||
'aiohttp==3.9.0b0; python_version >= "3.12"', | ||
'flake8~=5.0', | ||
'psutil', | ||
'pycodestyle~=2.9.0', | ||
'pyOpenSSL~=23.0.0', | ||
'mypy>=0.800', | ||
'Cython(>=0.29.36,<0.30.0)', | ||
] | ||
docs = [ | ||
'Sphinx~=4.1.2', | ||
'sphinxcontrib-asyncio~=0.3.0', | ||
'sphinx_rtd_theme~=0.5.2', | ||
] | ||
|
||
[build-system] | ||
requires = [ | ||
"setuptools", | ||
"wheel", | ||
"Cython" | ||
"setuptools>=60", | ||
"wheel", | ||
"Cython(>=0.29.36,<0.30.0)", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools] | ||
zip-safe = false | ||
packages = ["winloop"] | ||
|
||
[tool.setuptools.exclude-package-data] | ||
"*" = ["*.c", "*.h"] | ||
|
||
[tool.cibuildwheel] | ||
build-frontend = "build" | ||
test-extras = "test" | ||
test-command = "python -m unittest discover -v {project}/tests" | ||
|
||
build-backend = 'setuptools.build_meta' | ||
[tool.pytest.ini_options] | ||
addopts = "--capture=no --assert=plain --strict-markers --tb=native --import-mode=importlib" | ||
testpaths = "tests" | ||
filterwarnings = "default" |
Oops, something went wrong.
2bc04e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lschoe Do you think Winloop is ready for another update or is there a few things still being patched up on your end?
2bc04e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Vizonex. So, the current version supports
python setup.py build_ext --inplace
both on Windows and, what I've tested, on WSL. I haven't looked into the CI case, which will need some fixes (like forpython setup.py sdist
to work in general), at least to make.github\workflows\publish.yml
work again. Did you check what goes wrong?