diff --git a/devel/Makefile b/devel/Makefile index 323d58504c87..1991cf393877 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4098,6 +4098,7 @@ SUBDIR += py-arpeggio SUBDIR += py-arrow SUBDIR += py-asciimatics + SUBDIR += py-asgi-lifespan SUBDIR += py-asn1crypto SUBDIR += py-aspy.yaml SUBDIR += py-astor diff --git a/devel/py-asgi-lifespan/Makefile b/devel/py-asgi-lifespan/Makefile new file mode 100644 index 000000000000..522000a4cc0b --- /dev/null +++ b/devel/py-asgi-lifespan/Makefile @@ -0,0 +1,34 @@ +PORTNAME= asgi-lifespan +DISTVERSION= 1.0.1 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= meka@tilda.center +COMMENT= Programmatic startup/shutdown of ASGI apps + +LICENSE= PSFL + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sniffio>=0:devel/py-sniffio@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}trio>=0:net/py-trio@${PY_FLAVOR} + +USES= python:3.6+ +USE_PYTHON= autoplist concurrent distutils +USE_GITHUB= yes +GH_ACCOUNT= florimondmanca + +TEST_ENV= PYTHONPATH=${WRKSRC}/src + +NO_ARCH= yes + +do-test: + cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -o addopts= + +.include + +.if ${PYTHON_REL} < 30700 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}async-exit-stack>=0:devel/py-async-exit-stack@${PY_FLAVOR} +.endif + +.include diff --git a/devel/py-asgi-lifespan/distinfo b/devel/py-asgi-lifespan/distinfo new file mode 100644 index 000000000000..9a8cc9db419d --- /dev/null +++ b/devel/py-asgi-lifespan/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1626961600 +SHA256 (florimondmanca-asgi-lifespan-1.0.1_GH0.tar.gz) = 5da90d92a6880f6490a060fdbb7d08f46797270bf62379d40f18555878d86fff +SIZE (florimondmanca-asgi-lifespan-1.0.1_GH0.tar.gz) = 10745 diff --git a/devel/py-asgi-lifespan/pkg-descr b/devel/py-asgi-lifespan/pkg-descr new file mode 100644 index 000000000000..063cb377b875 --- /dev/null +++ b/devel/py-asgi-lifespan/pkg-descr @@ -0,0 +1,6 @@ +Programmatically send startup/shutdown lifespan events into ASGI applications. +When used in combination with an ASGI-capable HTTP client such as HTTPX, this +allows mocking or testing ASGI applications without having to spin up an ASGI +server. + +WWW: https://github.com/florimondmanca/asgi-lifespan