Skip to content

Commit

Permalink
www/py-requests: sync with upstream
Browse files Browse the repository at this point in the history
Taken from: FreeBSD
  • Loading branch information
fichtner committed Mar 28, 2022
1 parent 71e7e71 commit 0f9b9f7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
37 changes: 23 additions & 14 deletions www/py-requests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,45 @@

PORTNAME= requests
PORTVERSION= 2.25.1
PORTREVISION= 1
CATEGORIES= www python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= [email protected]
COMMENT= HTTP library written in Python for human beings
COMMENT= Python HTTP for Humans

LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE

RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}certifi>=2017.4.17:security/py-certifi@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}chardet>=3.0.2:textproc/py-chardet@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}idna>=2.5:dns/py-idna@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}urllib3>=1.21.1:net/py-urllib3@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=2.8.0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-httpbin>0:devel/py-pytest-httpbin@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-mock>0:devel/py-pytest-mock@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-xdist>0:devel/py-pytest-xdist@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}httpbin>0:www/py-httpbin@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}blinker>0:devel/py-blinker@${PY_FLAVOR}
${PYTHON_PKGNAMEPREFIX}chardet>=3.0.2,1<5,1:textproc/py-chardet@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}idna>=2.5<4:dns/py-idna@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}urllib3>=1.21.1,1<1.27,1:net/py-urllib3@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pysocks>=1.5.6:net/py-pysocks@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest>=3,1:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-cov>=0:devel/py-pytest-cov@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-httpbin>=0.0.7:devel/py-pytest-httpbin@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-mock>=0:devel/py-pytest-mock@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-xdist>=0,1:devel/py-pytest-xdist@${PY_FLAVOR}

USES= cpe python:3.6+
CPE_VENDOR= python
USE_PYTHON= autoplist concurrent distutils

NO_ARCH= yes

CPE_VENDOR= python

OPTIONS_DEFINE= SECURITY SOCKS
OPTIONS_DEFAULT=SECURITY SOCKS
SECURITY_DESC= Extra security functionalities
SOCKS_DESC= Extra socks functionalities

SECURITY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cryptography>=1.3.4:security/py-cryptography@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}openssl>=0.14:security/py-openssl@${PY_FLAVOR}
SOCKS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pysocks>=1.5.6:net/py-pysocks@${PY_FLAVOR}

do-test:
@cd ${WRKSRC} && pytest tests -v
cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -rs -v

.include <bsd.port.mk>
11 changes: 11 additions & 0 deletions www/py-requests/files/patch-setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- setup.py.orig 2020-12-16 17:43:25 UTC
+++ setup.py
@@ -43,7 +43,7 @@ packages = ['requests']

requires = [
'chardet>=3.0.2,<5',
- 'idna>=2.5,<3',
+ 'idna>=2.5,<4',
'urllib3>=1.21.1,<1.27',
'certifi>=2017.4.17'

0 comments on commit 0f9b9f7

Please sign in to comment.