- Change to flup6, a fork supports py3k

- Pass maintainership to submitter

PR:		224332
Submitted by:	Shane <FreeBSD@ShaneWare.Biz>
This commit is contained in:
Li-Wen Hsu 2017-12-26 18:33:18 +00:00
parent d1dcd7daf3
commit c889c66fce
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=457300
11 changed files with 100 additions and 31 deletions

1
MOVED
View file

@ -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

View file

@ -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

View file

@ -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>

View file

@ -1,2 +0,0 @@
SHA256 (flup-1.0.2.tar.gz) = 4bad317a5fc1ce3d4fe5e9b6d846ec38a8023e16876785d4f88102f2c8097dd9
SIZE (flup-1.0.2.tar.gz) = 49051

View file

@ -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/

18
www/py-flup6/Makefile Normal file
View file

@ -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>

3
www/py-flup6/distinfo Normal file
View file

@ -0,0 +1,3 @@
TIMESTAMP = 1513265989
SHA256 (flup6-1.1.1.tar.gz) = fd034c6862a320b9f8176a14fa94e05d67d59e61359c34c6dabd0d31a26a4084
SIZE (flup6-1.1.1.tar.gz) = 45810

View file

@ -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']

View file

@ -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):

View file

@ -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']

6
www/py-flup6/pkg-descr Normal file
View file

@ -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