From 8eeab6f00880089e9fa5a8376acf3b306df72729 Mon Sep 17 00:00:00 2001 From: Derek Schrock Date: Sun, 25 Mar 2018 18:31:42 -0400 Subject: [PATCH] New port www/py-httmock A mocking library for requests. https://github.com/patrys/httmock/ This port is supporing new port devel/py-python-gitlab TEST_DEPENDS --- www/py-httmock/Makefile | 35 +++++++++++++++++++++++++++++++++++ www/py-httmock/distinfo | 5 +++++ www/py-httmock/pkg-descr | 3 +++ 3 files changed, 43 insertions(+) create mode 100644 www/py-httmock/Makefile create mode 100644 www/py-httmock/distinfo create mode 100644 www/py-httmock/pkg-descr diff --git a/www/py-httmock/Makefile b/www/py-httmock/Makefile new file mode 100644 index 000000000000..fc2d1a4b2f55 --- /dev/null +++ b/www/py-httmock/Makefile @@ -0,0 +1,35 @@ +# Created by: Derek Schrock +# $FreeBSD$ + +PORTNAME= httmock +PORTVERSION= 1.2.6 +CATEGORIES= www python +MASTER_SITES= CHEESESHOP \ + https://raw.githubusercontent.com/patrys/${PORTNAME}/${PORTVERSION}/:tests +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ + tests.py:tests +DIST_SUBDIR= py-${PORTNAME} +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= dereks@lifeofadishwasher.com +COMMENT= Mocking library for requests + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests>=1.0.0:www/py-requests@${FLAVOR} + +USES= python +USE_PYTHON= distutils autoplist + +# Description: tests.py is missing from the pypi package +# Issue ID: https://github.com/patrys/httmock/issues/55 +# TODO: Remove extra MASTER_SITES, DISTFILES/SUBDIR, EXTRACT_ONLY, post-extract +post-extract: + @${MV} ${DISTDIR}/${DIST_SUBDIR}/tests.py ${WRKSRC} + +do-test: + cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test + +.include diff --git a/www/py-httmock/distinfo b/www/py-httmock/distinfo new file mode 100644 index 000000000000..b480a3312ac0 --- /dev/null +++ b/www/py-httmock/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1522615776 +SHA256 (py-httmock/httmock-1.2.6.tar.gz) = 4696306d1ff835c3ca865fdef2684d7e130b4120cc00126f862ba4797b1602ac +SIZE (py-httmock/httmock-1.2.6.tar.gz) = 4399 +SHA256 (py-httmock/tests.py) = 544bcd2a837b7493df8062b16611de4e53fc2761ffa25e9553a2ffdbc0972d2c +SIZE (py-httmock/tests.py) = 11680 diff --git a/www/py-httmock/pkg-descr b/www/py-httmock/pkg-descr new file mode 100644 index 000000000000..e7408b8ef3f5 --- /dev/null +++ b/www/py-httmock/pkg-descr @@ -0,0 +1,3 @@ +A mocking library for requests for Python 2.7 and 3.4+. + +WWW: https://github.com/patrys/httmock -- 2.16.3