aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi-Wen Hsu <lwhsu@FreeBSD.org>2017-12-26 18:33:18 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2017-12-26 18:33:18 +0000
commitc889c66fce4cad9f8d16b0eb04dbd1e6a1b9efce (patch)
tree87be112be9b178bdaeee447acb6bb89e84dd92a6
parentd1dcd7daf3a186914fecf49fee9ab8be8c59b07b (diff)
downloadports-c889c66fce4cad9f8d16b0eb04dbd1e6a1b9efce.tar.gz
ports-c889c66fce4cad9f8d16b0eb04dbd1e6a1b9efce.zip
- Change to flup6, a fork supports py3k
- Pass maintainership to submitter PR: 224332 Submitted by: Shane <FreeBSD@ShaneWare.Biz>
Notes
Notes: svn path=/head/; revision=457300
-rw-r--r--MOVED1
-rw-r--r--www/Makefile2
-rw-r--r--www/py-flup/Makefile18
-rw-r--r--www/py-flup/distinfo2
-rw-r--r--www/py-flup/pkg-descr10
-rw-r--r--www/py-flup6/Makefile18
-rw-r--r--www/py-flup6/distinfo3
-rw-r--r--www/py-flup6/files/patch-flup_server_ajp__base.py15
-rw-r--r--www/py-flup6/files/patch-flup_server_fcgi__base.py32
-rw-r--r--www/py-flup6/files/patch-flup_server_scgi__base.py24
-rw-r--r--www/py-flup6/pkg-descr6
11 files changed, 100 insertions, 31 deletions
diff --git a/MOVED b/MOVED
index 01b8c55af258..ea945604a2e0 100644
--- a/MOVED
+++ b/MOVED
@@ -9824,3 +9824,4 @@ math/petsc-mpich|science/PETSc|2017-12-20|Recreated after it has been deleted in
textproc/py-elasticsearch-py|textproc/py-elasticsearch|2017-12-21|Rename to match PyPI naming
japanese/egg-canna||2017-12-25|Has expired: Requires Emacs versions before 23
editors/tree-widget||2017-12-26|Has expired: Now part of Emacs
+www/py-flup|www/py-flup6|2017-12-26|forked, for py3k support
diff --git a/www/Makefile b/www/Makefile
index e42dcd7ecb85..dfcf4eb70615 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -1683,7 +1683,7 @@
SUBDIR += py-flask-uploads
SUBDIR += py-flask-wtf
SUBDIR += py-flexget
- SUBDIR += py-flup
+ SUBDIR += py-flup6
SUBDIR += py-formalchemy
SUBDIR += py-formencode
SUBDIR += py-frappe-bench
diff --git a/www/py-flup/Makefile b/www/py-flup/Makefile
deleted file mode 100644
index 0ddb908bfe37..000000000000
--- a/www/py-flup/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-# Created by: Li-Wen Hsu <lwhsu@lwhsu.org>
-# $FreeBSD$
-
-PORTNAME= flup
-PORTVERSION= 1.0.2
-PORTREVISION= 2
-CATEGORIES= www python
-MASTER_SITES= http://www.saddi.com/software/flup/dist/ \
- CHEESESHOP
-PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
-
-MAINTAINER= lwhsu@FreeBSD.org
-COMMENT= Random assortment of WSGI servers, middleware
-
-USES= python:2.7
-USE_PYTHON= distutils autoplist
-
-.include <bsd.port.mk>
diff --git a/www/py-flup/distinfo b/www/py-flup/distinfo
deleted file mode 100644
index af31ccf540a7..000000000000
--- a/www/py-flup/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (flup-1.0.2.tar.gz) = 4bad317a5fc1ce3d4fe5e9b6d846ec38a8023e16876785d4f88102f2c8097dd9
-SIZE (flup-1.0.2.tar.gz) = 49051
diff --git a/www/py-flup/pkg-descr b/www/py-flup/pkg-descr
deleted file mode 100644
index 32ca4b95d488..000000000000
--- a/www/py-flup/pkg-descr
+++ /dev/null
@@ -1,10 +0,0 @@
-This Python package is a random collection of WSGI modules
-written by Allan Saddi.
-
-flup is functionally divided into three components:
-
- * FlupServers
- * FlupMiddleware
- * FlupPublisher
-
-WWW: http://www.saddi.com/software/flup/
diff --git a/www/py-flup6/Makefile b/www/py-flup6/Makefile
new file mode 100644
index 000000000000..a7c9ef4d6fbb
--- /dev/null
+++ b/www/py-flup6/Makefile
@@ -0,0 +1,18 @@
+# $FreeBSD$
+
+PORTNAME= flup6
+PORTVERSION= 1.1.1
+CATEGORIES= www python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= FreeBSD@Shaneware.biz
+COMMENT= Random assortment of WSGI servers
+
+LICENSE= BSD2CLAUSE
+
+USES= python
+USE_PYTHON= distutils autoplist
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/www/py-flup6/distinfo b/www/py-flup6/distinfo
new file mode 100644
index 000000000000..34f6e7cb2382
--- /dev/null
+++ b/www/py-flup6/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1513265989
+SHA256 (flup6-1.1.1.tar.gz) = fd034c6862a320b9f8176a14fa94e05d67d59e61359c34c6dabd0d31a26a4084
+SIZE (flup6-1.1.1.tar.gz) = 45810
diff --git a/www/py-flup6/files/patch-flup_server_ajp__base.py b/www/py-flup6/files/patch-flup_server_ajp__base.py
new file mode 100644
index 000000000000..a357f5c15ca7
--- /dev/null
+++ b/www/py-flup6/files/patch-flup_server_ajp__base.py
@@ -0,0 +1,15 @@
+--- flup/server/ajp_base.py.orig 2017-12-16 07:40:39 UTC
++++ flup/server/ajp_base.py
+@@ -38,7 +38,11 @@ import datetime
+ import time
+
+ # Unfortunately, for now, threads are required.
+-import thread
++try:
++ import thread
++except:
++ import _thread as thread
++
+ import threading
+
+ __all__ = ['BaseAJPServer']
diff --git a/www/py-flup6/files/patch-flup_server_fcgi__base.py b/www/py-flup6/files/patch-flup_server_fcgi__base.py
new file mode 100644
index 000000000000..9063b49e1c59
--- /dev/null
+++ b/www/py-flup6/files/patch-flup_server_fcgi__base.py
@@ -0,0 +1,32 @@
+--- flup/server/fcgi_base.py 2015-08-01 02:01:48 UTC
++++ flup/server/fcgi_base.py
+@@ -49,9 +49,11 @@ thread_available = True
+ if sys.hexversion >= 0x03000000:
+ text_type = str
+ force_str = lambda s: s.decode('latin-1')
++ py3k = True
+ else:
+ text_type = unicode
+ force_str = lambda s: s
++ py3k = False
+
+ # Apparently 2.3 doesn't define SHUT_WR? Assume it is 1 in this case.
+ if not hasattr(socket, 'SHUT_WR'):
+@@ -601,9 +603,14 @@ class CGIRequest(Request):
+
+ self.server = server
+ self.params = dict(os.environ)
+- self.stdin = sys.stdin.buffer
+- self.stdout = StdoutWrapper(sys.stdout.buffer) # Oh, the humanity!
+- self.stderr = sys.stderr.buffer
++ if py3k:
++ self.stdin = sys.stdin.buffer
++ self.stdout = StdoutWrapper(sys.stdout.buffer) # Oh, the humanity!
++ self.stderr = sys.stderr.buffer
++ else:
++ self.stdin = sys.stdin
++ self.stdout = StdoutWrapper(sys.stdout) # Oh, the humanity!
++ self.stderr = sys.stderr
+ self.data = BytesIO()
+
+ def _end(self, appStatus=0, protocolStatus=FCGI_REQUEST_COMPLETE):
diff --git a/www/py-flup6/files/patch-flup_server_scgi__base.py b/www/py-flup6/files/patch-flup_server_scgi__base.py
new file mode 100644
index 000000000000..5fab2c3cb8ac
--- /dev/null
+++ b/www/py-flup6/files/patch-flup_server_scgi__base.py
@@ -0,0 +1,24 @@
+--- flup/server/scgi_base.py.orig 2017-12-16 07:40:10 UTC
++++ flup/server/scgi_base.py
+@@ -32,7 +32,7 @@ import logging
+ import socket
+ import select
+ import errno
+-import cStringIO as StringIO
++import io as StringIO
+ import signal
+ import datetime
+ import os
+@@ -40,7 +40,11 @@ import warnings
+
+ # Threads are required. If you want a non-threaded (forking) version, look at
+ # SWAP <http://www.idyll.org/~t/www-tools/wsgi/>.
+-import thread
++try:
++ import thread
++except:
++ import _thread as thread
++
+ import threading
+
+ __all__ = ['BaseSCGIServer']
diff --git a/www/py-flup6/pkg-descr b/www/py-flup6/pkg-descr
new file mode 100644
index 000000000000..05c78841cd4b
--- /dev/null
+++ b/www/py-flup6/pkg-descr
@@ -0,0 +1,6 @@
+This Python package is a random collection of WSGI modules
+
+It is a fork of Allan Saddi's flup package, and is intended to
+support both python2 and python3 from a single code base.
+
+WWW: https://bitbucket.org/denisenkom/flup