dev-python/hypercorn: new package

Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2020-12-06 09:50:12 +01:00
parent 58baba5b6e
commit 40f212a7e9
3 changed files with 104 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST hypercorn-0.11.1.zip 189203 BLAKE2B c11a2a221fb6b5a02e96b0f463e33583389c4ab31503572f85f140d6b2d8bf58854441b31599861b648fb0b089bb7d46ec3fa7f972de963d2a2ef28a1da48e84 SHA512 7e7e1980bb82e64154f97059c90d1b429c3f18b8e40b51c2821ddf4e838dd7d95de66e83a09afd52abc8ba2758e1f43831af61c7ad79d829c9409ab6cee4d410

View File

@@ -0,0 +1,75 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{7,8} )
DISTUTILS_USE_SETUPTOOLS=rdepend
DOCBUILDER="sphinx"
DOCDEPEND="
dev-python/sphinxcontrib-napoleon
dev-python/pydata-sphinx-theme
"
DOCDIR="${S}/docs"
inherit distutils-r1 docs optfeature
DESCRIPTION="ASGI Server based on Hyper libraries and inspired by Gunicorn"
HOMEPAGE="
https://gitlab.com/pgjones/hypercorn
https://github.com/pgjones/hypercorn
https://pypi.org/project/Hypercorn
"
SRC_URI="https://github.com/pgjones/hypercorn/archive/${PV}.zip -> ${P}.zip"
LICENSE="MIT"
KEYWORDS="~amd64 ~x86"
SLOT="0"
RESTRICT=""
RDEPEND="
dev-python/h11[${PYTHON_USEDEP}]
>=dev-python/hyper-h2-3.1.0[${PYTHON_USEDEP}]
dev-python/priority[${PYTHON_USEDEP}]
dev-python/toml[${PYTHON_USEDEP}]
>=dev-python/wsproto-0.14.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/typing-extensions[${PYTHON_USEDEP}]' python3_7)
"
BDEPEND="
test? (
dev-python/hypothesis[${PYTHON_USEDEP}]
>=dev-python/mock-4[${PYTHON_USEDEP}]
<dev-python/pytest-6[${PYTHON_USEDEP}]
dev-python/pytest-asyncio[${PYTHON_USEDEP}]
dev-python/pytest-cov[${PYTHON_USEDEP}]
dev-python/pytest-trio[${PYTHON_USEDEP}]
dev-python/trio[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
#python_prepare_all() {
# # do not install LICENSE to /usr/
# sed -i -e '/data_files/d' setup.py || die
#
# # Remove pytest-cov dep
# sed -i -e '21,22d' setup.cfg || die
#
# distutils-r1_python_prepare_all
#}
#pkg_postinst() {
# optfeature "asyncio event loop on top of libuv" dev-python/uvloop
# optfeature "websockets support using wsproto" dev-python/wsproto
# optfeature "websockets support using websockets" dev-python/websockets
# optfeature "httpstools package for http protocol" dev-python/httptools
# optfeature "efficient debug reload" dev-python/watchgod
#}
#python_test() {
# pytest -vv \
# --deselect tests/protocols/test_http.py::test_supported_upgrade_request[H11Protocol] \
# --deselect tests/protocols/test_http.py::test_supported_upgrade_request[HttpToolsProtocol] \
# --deselect tests/protocols/test_websocket.py::test_invalid_upgrade[WSProtocol] \
# || die
#}

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<longdescription lang="en">
Hypercorn is an ASGI web server based on the sans-io hyper, h11, h2, and wsproto libraries
and inspired by Gunicorn. Hypercorn supports HTTP/1, HTTP/2, WebSockets (over HTTP/1 and
HTTP/2), ASGI/2, and ASGI/3 specifications. Hypercorn can utilise asyncio, uvloop, or trio
worker types.
Hypercorn can optionally serve the current draft of the HTTP/3 specification
using the aioquic library. To enable this install the h3 optional extra, pip install
hypercorn[h3] and then choose a quic binding e.g. hypercorn --quic-bind localhost:4433
Hypercorn was initially part of Quart before being separated out into a
standalone ASGI server. Hypercorn forked from version 0.5.0 of Quart.
</longdescription>
<upstream>
<remote-id type="github">pgjones/hypercorn</remote-id>
<remote-id type="gitlab">pgjones/hypercorn</remote-id>
<remote-id type="pypi">hypercorn</remote-id>
</upstream>
</pkgmetadata>