Date: Sat, 28 Jan 2012 18:05:21 GMT From: Olivier Duchateau <duchateau.olivier@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/164582: [NEW PORT] www/py-bjoern, a fast Python WSGI server Message-ID: <201201281805.q0SI5LZK038346@red.freebsd.org> Resent-Message-ID: <201201281810.q0SIA8Ze057410@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 164582 >Category: ports >Synopsis: [NEW PORT] www/py-bjoern, a fast Python WSGI server >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jan 28 18:10:08 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Olivier Duchateau >Release: FreeBSD 8.2-RELEASE-p3 i386 >Organization: >Environment: >Description: Bjoern, is a fast and ultra-lightweight asynchronous HTTP/1.1 WSGI server. >How-To-Repeat: >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # py-bjoern/ # py-bjoern/files # py-bjoern/files/patch-setup.py # py-bjoern/files/patch-bjoern_server.c # py-bjoern/pkg-descr # py-bjoern/distinfo # py-bjoern/Makefile # echo c - py-bjoern/ mkdir -p py-bjoern/ > /dev/null 2>&1 echo c - py-bjoern/files mkdir -p py-bjoern/files > /dev/null 2>&1 echo x - py-bjoern/files/patch-setup.py sed 's/^X//' >py-bjoern/files/patch-setup.py << '4112ec1359611c7b78a7dfba5c88986f' X--- setup.py.orig 2011-04-23 23:23:14.000000000 +0200 X+++ setup.py 2011-10-23 17:12:46.000000000 +0200 X@@ -8,8 +8,9 @@ X bjoern_extension = Extension( X 'bjoern', X sources = SOURCE_FILES, X- libraries = ['ev'], X- include_dirs = ['http-parser'], X+ library_dirs = ['%%LOCALBASE%%/lib'], X+ libraries = ['c', 'ev'], X+ include_dirs = ['/usr/include', '%%LOCALBASE%%/include', 'http-parser'], X define_macros = [('WANT_SENDFILE', '1'), X ('WANT_SIGINT_HANDLING', '1')], X extra_compile_args = ['-std=c99', '-fno-strict-aliasing', '-Wall', 4112ec1359611c7b78a7dfba5c88986f echo x - py-bjoern/files/patch-bjoern_server.c sed 's/^X//' >py-bjoern/files/patch-bjoern_server.c << 'a2ff3a16034ddde335326027bff20cd2' X--- bjoern/server.c.orig 2011-03-23 19:02:58.000000000 +0100 X+++ bjoern/server.c 2011-12-17 22:10:03.000000000 +0100 X@@ -1,11 +1,17 @@ X-#include <sys/socket.h> X #include <netinet/in.h> X #include <arpa/inet.h> X #include <fcntl.h> X #ifdef WANT_SIGINT_HANDLING X # include <sys/signal.h> X #endif X+#if defined(__FreeBSD__) X+#include <sys/types.h> X+#include <sys/socket.h> X+#include <sys/uio.h> X+#elif defined(__linux__) X+#include <sys/socket.h> X #include <sys/sendfile.h> X+#endif X #include <ev.h> X #include "common.h" X #include "wsgi.h" X@@ -294,7 +300,9 @@ X Py_ssize_t bytes_sent = sendfile( X request->client_fd, X request->current_chunk_p, /* current_chunk_p stores the file fd */ X- NULL, SENDFILE_CHUNK_SIZE X+ NULL, SENDFILE_CHUNK_SIZE, X+ NULL, NULL, X+ SF_NODISKIO X ); X if(bytes_sent == -1) X return handle_nonzero_errno(request); a2ff3a16034ddde335326027bff20cd2 echo x - py-bjoern/pkg-descr sed 's/^X//' >py-bjoern/pkg-descr << 'cef77d300e80505f30e4d273df9e4df9' Xbjoern, is a fast and ultra-lightweight asynchronous HTTP/1.1 WSGI server. It Xuses Marc Lehmann's hight performance libev event loop and Ryan Dahl's Xhttp-parser. X XWWW: https://github.com/jonashaag/bjoern cef77d300e80505f30e4d273df9e4df9 echo x - py-bjoern/distinfo sed 's/^X//' >py-bjoern/distinfo << '5ecb7df36af27635eecf76802e16d18a' XSHA256 (bjoern-1.2.tar.gz) = 9a4cf18fbcab49a0b53e98c9b1837df311af1ec58f711fcf91172b83e07b1e20 XSIZE (bjoern-1.2.tar.gz) = 22811 5ecb7df36af27635eecf76802e16d18a echo x - py-bjoern/Makefile sed 's/^X//' >py-bjoern/Makefile << '85c30ce42746c41fd8a87eee3a4ec3f4' X# New ports collection makefile for: py-bjoern X# Date created: 2011-10-23 X# Whom: Olivier Duchateau <duchateau.olivier@gmail.com> X# X# $FreeBSD$ X# X XPORTNAME= bjoern XPORTVERSION= 1.2 XCATEGORIES= www python XMASTER_SITES= CHEESESHOP XPKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} X XMAINTAINER= duchateau.olivier@gmail.com XCOMMENT= A screamingly fast Python WSGI server X XLICENSE= BSD XLICENSE_FILE= ${WRKSRC}/LICENSE X XLIB_DEPENDS= ev.4:${PORTSDIR}/devel/libev X XUSE_PYTHON= 2.6+ XUSE_PYDISTUTILS= yes X XMAKE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \ X LDFLAGS="-L${LOCALBASE}/lib" X XPLIST_FILES= %%PYTHON_SITELIBDIR%%/${PORTNAME}.so X Xpost-patch: X @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ X ${WRKSRC}/setup.py X X.include <bsd.port.mk> 85c30ce42746c41fd8a87eee3a4ec3f4 exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201281805.q0SI5LZK038346>