git: 2dc64c4a2353 - main - www/py-requests-cache93: New Port

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Mon, 06 Jun 2022 11:28:52 UTC
The branch main has been updated by bofh:

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

commit 2dc64c4a2353580d8ea3f9ab181f642ae6832e17
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2022-06-06 11:22:40 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-06-06 11:28:44 +0000

    www/py-requests-cache93: New Port
    
    This is 0.9.3 branch of www/py-requests-cache which is required for
    www/py-tvdb_api
    
    requests-cache is a transparent, persistent cache that provides an easy
    way to get better performance with the python requests library.
    
    Features:
    - Ease of use: Keep using the requests library you're already familiar
      with. Add caching with a drop-in replacement for requests.Session, or
      install globally to add caching to all requests functions.
    - Performance: Get sub-millisecond response times for cached responses.
      When they expire, you still save time with conditional requests.
    - Persistence: Works with several storage backends including SQLite,
      Redis, MongoDB, and DynamoDB; or save responses as plain JSON files,
      YAML, and more
    - Customization: Works out of the box with zero config, but with a
      robust set of features for configuring and extending the library to
      suit your needs
    - Expiration: Keep your cache fresh using Cache-Control, eagerly cache
      everything for long-term storage, use URL patterns for selective
      caching, or any combination of strategies
    - Compatibility: Can be combined with other popular libraries based on
      requests
    
    WWW: https://github.com/reclosedev/requests-cache
---
 www/Makefile                      |  1 +
 www/py-requests-cache93/Makefile  | 29 +++++++++++++++++++++++++++++
 www/py-requests-cache93/distinfo  |  3 +++
 www/py-requests-cache93/pkg-descr | 19 +++++++++++++++++++
 4 files changed, 52 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index 32b809de1847..fcd5261224db 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -1742,6 +1742,7 @@
     SUBDIR += py-requests
     SUBDIR += py-requests-aws4auth
     SUBDIR += py-requests-cache
+    SUBDIR += py-requests-cache93
     SUBDIR += py-requests-file
     SUBDIR += py-requests-futures
     SUBDIR += py-requests-mock
diff --git a/www/py-requests-cache93/Makefile b/www/py-requests-cache93/Makefile
new file mode 100644
index 000000000000..33f06ea80c69
--- /dev/null
+++ b/www/py-requests-cache93/Makefile
@@ -0,0 +1,29 @@
+PORTNAME=	requests-cache
+PORTVERSION=	0.9.3
+CATEGORIES=	www python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+PKGNAMESUFFIX=	93
+
+MAINTAINER=	bofh@FreeBSD.org
+COMMENT=	Transparent persistent cache for the requests library (0.9.3 branch)
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}appdirs>=1.4.4<2.0.0:devel/py-appdirs@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}attrs>=21.2<22.0:devel/py-attrs@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}cattrs>=1.8<2.0:devel/py-cattrs@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}requests>=2.22<3.0:www/py-requests@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}url-normalize>=1.4<2.0:net/py-url-normalize@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}urllib3>=1.25.5,1<2.0.0,1:net/py-urllib3@${PY_FLAVOR}
+
+USES=		python:3.7+
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+do-test:
+	cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -rs -v
+
+.include <bsd.port.mk>
diff --git a/www/py-requests-cache93/distinfo b/www/py-requests-cache93/distinfo
new file mode 100644
index 000000000000..feba47ef324b
--- /dev/null
+++ b/www/py-requests-cache93/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1654497752
+SHA256 (requests-cache-0.9.3.tar.gz) = b32f8afba2439e1b3e12cba511c8f579271eff827f063210d62f9efa5bed6564
+SIZE (requests-cache-0.9.3.tar.gz) = 1506512
diff --git a/www/py-requests-cache93/pkg-descr b/www/py-requests-cache93/pkg-descr
new file mode 100644
index 000000000000..cbffa1b55be5
--- /dev/null
+++ b/www/py-requests-cache93/pkg-descr
@@ -0,0 +1,19 @@
+requests-cache is a transparent, persistent cache that provides an easy way to
+get better performance with the python requests library.
+
+Features:
+- Ease of use: Keep using the requests library you're already familiar with. Add
+  caching with a drop-in replacement for requests.Session, or install globally
+  to add caching to all requests functions.
+- Performance: Get sub-millisecond response times for cached responses. When
+  they expire, you still save time with conditional requests.
+- Persistence: Works with several storage backends including SQLite, Redis,
+  MongoDB, and DynamoDB; or save responses as plain JSON files, YAML, and more
+- Customization: Works out of the box with zero config, but with a robust set of
+  features for configuring and extending the library to suit your needs
+- Expiration: Keep your cache fresh using Cache-Control, eagerly cache
+  everything for long-term storage, use URL patterns for selective caching, or
+  any combination of strategies
+- Compatibility: Can be combined with other popular libraries based on requests
+
+WWW: https://github.com/reclosedev/requests-cache