Saturday, June 29, 2019

Moving www/py-wsgiproxy to using WSGIProxy2

py-wsgiproxy doesn't have any consumers. py-webtest has comment about
needing WSGIProxy2.

WSGIProxy2 uses wsgiproxy as its module name just like WSGIProxy does.

So, while I could propose a new port for WSGIProxy2, I figure perhaps
we just replace py-wsgiproxy with it?

Below is a diff that does just that.

I do have a version of it as a new port if desired instead.

All tests pass for both flavors on amd64.

--Kurt

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/py-wsgiproxy/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile 29 Sep 2015 10:53:17 -0000 1.12
+++ Makefile 30 Jun 2019 02:50:02 -0000
@@ -1,27 +1,30 @@
-# $OpenBSD: Makefile,v 1.12 2015/09/29 10:53:17 sthen Exp $
+# $OpenBSD$

-COMMENT = http proxying tools for wsgi apps
+COMMENT = WSGI proxy with various http client backends

-MODPY_EGG_VERSION = 0.2.2
-DISTNAME = WSGIProxy-${MODPY_EGG_VERSION}
-PKGNAME = py-${DISTNAME:L}
-REVISION = 2
+MODPY_EGG_VERSION = 0.4.6
+DISTNAME = WSGIProxy2-${MODPY_EGG_VERSION}
+PKGNAME = py-${DISTNAME:L}

-CATEGORIES = www devel
+CATEGORIES = www

-HOMEPAGE = http://pythonpaste.org/wsgiproxy/
+HOMEPAGE = https://github.com/gawel/WSGIProxy2/

# MIT
-PERMIT_PACKAGE_CDROM = Yes
-
-MODPY_PI = Yes
-
-MODULES = lang/python
+PERMIT_PACKAGE = Yes

+MODULES = lang/python
+MODPY_PI = Yes
MODPY_SETUPTOOLS = Yes
+MODPY_PYTEST = Yes
+MODPY_PYTEST_ARGS = lib/wsgiproxy

-RUN_DEPENDS = www/py-paste
+FLAVORS = python3
+FLAVOR ?=

-NO_TEST = Yes
+RUN_DEPENDS = devel/py-six${MODPY_FLAVOR} \
+ www/py-webob${MODPY_FLAVOR}
+TEST_DEPENDS = www/py-requests${MODPY_FLAVOR} \
+ www/py-webtest${MODPY_FLAVOR}

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/py-wsgiproxy/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 18 Jan 2015 03:15:49 -0000 1.4
+++ distinfo 30 Jun 2019 02:50:02 -0000
@@ -1,2 +1,2 @@
-SHA256 (WSGIProxy-0.2.2.tar.gz) = LzIuLEXG5mO+/xgBJVJA83Cyb+9zkvXOUAGtzRAOH3M=
-SIZE (WSGIProxy-0.2.2.tar.gz) = 10089
+SHA256 (WSGIProxy2-0.4.6.tar.gz) = zuKmSrwZPMlsf/Egi3CTNemk0TFs6EuRUBECFm2BTJo=
+SIZE (WSGIProxy2-0.4.6.tar.gz) = 16481
Index: patches/patch-wsgiproxy_middleware_py
===================================================================
RCS file: patches/patch-wsgiproxy_middleware_py
diff -N patches/patch-wsgiproxy_middleware_py
--- patches/patch-wsgiproxy_middleware_py 22 Jan 2014 00:16:11 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-wsgiproxy_middleware_py,v 1.1 2014/01/22 00:16:11 fgsch Exp $
---- wsgiproxy/middleware.py.orig Sun Jan 12 16:05:02 2014
-+++ wsgiproxy/middleware.py Sun Jan 12 16:05:05 2014
-@@ -1,4 +1,7 @@
--import simplejson
-+try:
-+ import json as simplejson
-+except ImportError:
-+ import simplejson
- import cPickle as pickle
- import urllib
- from wsgiproxy import protocol_version

No comments:

Post a Comment