git: a04e3cb01f8a - main - www/py-aioresponses: New port: Helper for mock/fake web requests in python aiohttp package

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 10 Nov 2024 20:13:43 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a04e3cb01f8a5c0ce1873ce0350388a8cfbe7224

commit a04e3cb01f8a5c0ce1873ce0350388a8cfbe7224
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-11-10 20:06:22 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-11-10 20:13:34 +0000

    www/py-aioresponses: New port: Helper for mock/fake web requests in python aiohttp package
---
 www/Makefile                  |  1 +
 www/py-aioresponses/Makefile  | 31 +++++++++++++++++++++++++++++++
 www/py-aioresponses/distinfo  |  3 +++
 www/py-aioresponses/pkg-descr |  8 ++++++++
 4 files changed, 43 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index 9a849b8b0d85..424e222ff4ca 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -1457,6 +1457,7 @@
     SUBDIR += py-aiohttp-wsgi
     SUBDIR += py-aiohttp_cors
     SUBDIR += py-aioquic
+    SUBDIR += py-aioresponses
     SUBDIR += py-aiostream
     SUBDIR += py-arxiv
     SUBDIR += py-asgi-csrf
diff --git a/www/py-aioresponses/Makefile b/www/py-aioresponses/Makefile
new file mode 100644
index 000000000000..a8808eef513d
--- /dev/null
+++ b/www/py-aioresponses/Makefile
@@ -0,0 +1,31 @@
+PORTNAME=	aioresponses
+PORTVERSION=	0.7.6
+CATEGORIES=	www python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Helper for mock/fake web requests in python aiohttp package
+WWW=		https://github.com/pnuckowski/aioresponses
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PY_SETUPTOOLS} \
+		${PYTHON_PKGNAMEPREFIX}pbr>0:devel/py-pbr@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}aiohttp>=3.3.0:www/py-aiohttp@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}asynctest>=0.13.0:devel/py-asynctest@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}coverage>=5.2.1:devel/py-coverage@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}ddt>=1.4.1:devel/py-ddt@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest-cov>=2.10.1:devel/py-pytest-cov@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest-html>=2.1.1:devel/py-pytest-html@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}tox>=3.19.0:devel/py-tox@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}yarl>=1.8.2:www/py-yarl@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	pep517 autoplist pytest
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/www/py-aioresponses/distinfo b/www/py-aioresponses/distinfo
new file mode 100644
index 000000000000..87893cd46f9d
--- /dev/null
+++ b/www/py-aioresponses/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1731267539
+SHA256 (aioresponses-0.7.6.tar.gz) = f795d9dbda2d61774840e7e32f5366f45752d1adc1b74c9362afd017296c7ee1
+SIZE (aioresponses-0.7.6.tar.gz) = 35846
diff --git a/www/py-aioresponses/pkg-descr b/www/py-aioresponses/pkg-descr
new file mode 100644
index 000000000000..641eac4d2bf7
--- /dev/null
+++ b/www/py-aioresponses/pkg-descr
@@ -0,0 +1,8 @@
+Aioresponses is a helper to mock/fake web requests in python aiohttp package.
+
+For requests module there are a lot of packages that help us with testing
+(eg. httpretty, responses, requests-mock).
+
+When it comes to testing asynchronous HTTP requests it is a bit harder
+(at least at the beginning). The purpose of this package is to provide an
+easy way to test asynchronous HTTP requests.