svn commit: r566461 - in head/www: . py-httpbin py-httpbin/files

Ruslan Makhmatkhanov rm at FreeBSD.org
Wed Feb 24 09:54:20 UTC 2021


Author: rm
Date: Wed Feb 24 09:54:19 2021
New Revision: 566461
URL: https://svnweb.freebsd.org/changeset/ports/566461

Log:
  A simple HTTP Request & Response Service.
  
  WWW: https://github.com/postmanlabs/httpbin
  
  PR:		251847
  Submitted by:	contact at evilham.com

Added:
  head/www/py-httpbin/
  head/www/py-httpbin/Makefile   (contents, props changed)
  head/www/py-httpbin/distinfo   (contents, props changed)
  head/www/py-httpbin/files/
  head/www/py-httpbin/files/patch-test__httpbin.py   (contents, props changed)
  head/www/py-httpbin/pkg-descr   (contents, props changed)
Modified:
  head/www/Makefile

Modified: head/www/Makefile
==============================================================================
--- head/www/Makefile	Wed Feb 24 09:36:00 2021	(r566460)
+++ head/www/Makefile	Wed Feb 24 09:54:19 2021	(r566461)
@@ -1641,6 +1641,7 @@
     SUBDIR += py-html5-parser
     SUBDIR += py-html5lib
     SUBDIR += py-httmock
+    SUBDIR += py-httpbin
     SUBDIR += py-httpcore
     SUBDIR += py-httpie
     SUBDIR += py-httplib2

Added: head/www/py-httpbin/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/py-httpbin/Makefile	Wed Feb 24 09:54:19 2021	(r566461)
@@ -0,0 +1,31 @@
+# $FreeBSD$
+
+PORTNAME=	httpbin
+PORTVERSION=	0.7.0
+CATEGORIES=	www python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	contact at evilham.com
+COMMENT=	HTTP Request & Response Service
+
+LICENSE=	ISCL
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}blinker>=1.1:devel/py-blinker@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}brotlipy>=0:archivers/py-brotlipy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}decorator>=0:devel/py-decorator@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}markupsafe>=0:textproc/py-markupsafe@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}Flask>=0:www/py-flask@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}itsdangerous>=0:security/py-itsdangerous@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}raven>=0:devel/py-raven@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}werkzeug>=0.14.1:www/py-werkzeug@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}six>=0:devel/py-six@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent distutils
+
+do-test:
+	@cd ${WRKSRC} && ${PYTHON_CMD} test_httpbin.py
+
+.include <bsd.port.mk>

Added: head/www/py-httpbin/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/py-httpbin/distinfo	Wed Feb 24 09:54:19 2021	(r566461)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1607953372
+SHA256 (httpbin-0.7.0.tar.gz) = cbb37790c91575f4f15757f42ad41d9f729eb227d5edbe89e4ec175486db8dfa
+SIZE (httpbin-0.7.0.tar.gz) = 92613

Added: head/www/py-httpbin/files/patch-test__httpbin.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/py-httpbin/files/patch-test__httpbin.py	Wed Feb 24 09:54:19 2021	(r566461)
@@ -0,0 +1,24 @@
+--- test_httpbin.py.orig	2018-05-08 11:41:03 UTC
++++ test_httpbin.py
+@@ -144,7 +144,9 @@ class HttpbinTestCase(unittest.TestCase):
+         data = json.loads(response.data.decode('utf-8'))
+         self.assertEqual(data['args'], {})
+         self.assertEqual(data['headers']['Host'], 'localhost')
+-        self.assertEqual(data['headers']['Content-Length'], '0')
++        # Newest Werkzeug versions omit Content-Length if '0'; see
++        # https://github.com/postmanlabs/httpbin/pull/555/files
++        self.assertEqual(data['headers'].get('Content-Length', '0'), '0')
+         self.assertEqual(data['headers']['User-Agent'], 'test')
+         # self.assertEqual(data['origin'], None)
+         self.assertEqual(data['url'], 'http://localhost/get')
+@@ -158,7 +160,9 @@ class HttpbinTestCase(unittest.TestCase):
+         data = json.loads(response.data.decode('utf-8'))
+         self.assertEqual(data['args'], {})
+         self.assertEqual(data['headers']['Host'], 'localhost')
+-        self.assertEqual(data['headers']['Content-Length'], '0')
++        # Newest Werkzeug versions omit Content-Length if '0'; see
++        # https://github.com/postmanlabs/httpbin/pull/555/files
++        self.assertEqual(data['headers'].get('Content-Length', '0'), '0')
+         self.assertEqual(data['url'], 'http://localhost/anything/foo/bar')
+         self.assertEqual(data['method'], 'GET')
+         self.assertTrue(response.data.endswith(b'\n'))

Added: head/www/py-httpbin/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/py-httpbin/pkg-descr	Wed Feb 24 09:54:19 2021	(r566461)
@@ -0,0 +1,3 @@
+A simple HTTP Request & Response Service.
+
+WWW: https://github.com/postmanlabs/httpbin


More information about the svn-ports-all mailing list