Skip to content

Commit

Permalink
www/py-gunicorn: Update to 19.4.1 & much more!
Browse files Browse the repository at this point in the history
- Update PORTVERSION and distinfo checksum (19.4.1)
- Match COMMENT to setup.py:description=
- Add LICENSE_FILE
- Options: Rename SETPROC option -> Add PROCTITLE to defaults
- Options: Add GAIOHTTP async worker
- Options: Update all descriptions
- Options: Remove TESTS optionjs
- Enable "concurrent" Python support
- Add NO_ARCH (architecture independent package)
- Rename test target to new conventions
- Check, limit, and add BROKEN message for Option/Python version
  combinations that aren't supported.
- Patch out non-compulsory dependencies from test requirements file
- Delete requirements_dev.txt patch file (no longer necessary)

- Add post-patch: target to remove _gaiohttp.py, because compileall() of this file
  fails on 2.x with a SyntaxError, but is not handled, so .py[co] files references
  are added to --record output, breaking file list generation. [1][2][3][4][5]

Changes:

  http://docs.gunicorn.org/en/stable/news.html

[1] benoitc/gunicorn#788
[2] benoitc/gunicorn#860
[3] benoitc/gunicorn#982
[4] pypa/pip#1873
[5] pypa/pip#1954


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@404558 35697150-7ecd-e111-bb59-0022644237b5
  • Loading branch information
koobs committed Dec 27, 2015
1 parent f833c10 commit ac28e2b
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 25 deletions.
62 changes: 44 additions & 18 deletions www/py-gunicorn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,67 @@
# $FreeBSD$

PORTNAME= gunicorn
PORTVERSION= 18.0
PORTREVISION= 1
PORTVERSION= 19.4.1
CATEGORIES= www python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= [email protected]
COMMENT= Python WSGI server for UNIX
COMMENT= WSGI HTTP Server for UNIX

LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE

TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest

OPTIONS_DEFINE= SETPROC TESTS
OPTIONS_DEFINE= PROCTITLE
OPTIONS_DEFAULT= PROCTITLE
OPTIONS_GROUP= WORKERS
OPTIONS_GROUP_WORKERS= EVENTLET GEVENT TORNADO
OPTIONS_GROUP_WORKERS= EVENTLET GAIOHTTP GEVENT TORNADO

EVENTLET_DESC= Eventlet async worker support
GEVENT_DESC= Gevent async worker support
TORNADO_DESC= Tornado async worker support
SETPROC_DESC= Support custom process names (setproctitle)
TESTS_DESC= Install pytest for unit tests
EVENTLET_DESC= Eventlet async worker
GAIOHTTP_DESC= gaiohttp async worker (Requires Python 3.3+)
GEVENT_DESC= Gevent async worker (Requires Python < 3.x)
PROCTITLE_DESC= Custom process titles with setproctitle(3)
TORNADO_DESC= Tornado async worker

EVENTLET_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}eventlet>=0.9.7:${PORTSDIR}/net/py-eventlet
GAIOHTTP_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiohttp>0:${PORTSDIR}/www/py-aiohttp
GEVENT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gevent>=0.12.2:${PORTSDIR}/devel/py-gevent
PROCTITLE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setproctitle>0:${PORTSDIR}/devel/py-setproctitle
TORNADO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tornado>=2.2:${PORTSDIR}/www/py-tornado
SETPROC_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setproctitle>0:${PORTSDIR}/devel/py-setproctitle
TESTS_BUILD_DEPENDS= ${TEST_DEPENDS}

USE_GITHUB= yes
USES= python
USE_PYTHON= distutils autoplist
USES= python
USE_GITHUB= yes
USE_PYTHON= autoplist concurrent distutils

GH_ACCOUNT= benoitc

regression-test: build
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test
NO_ARCH= yes

.include <bsd.port.mk>
.include <bsd.port.pre.mk>

.if ${PYTHON_REL} < 3300
TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock
.endif

.if ${PYTHON_REL} > 3000 && ${PORT_OPTIONS:MGEVENT}
BROKEN= GEVENT requires Python < 3.x but this port is building with Python ${PYTHON_VER}. \
Disable the GEVENT option of change the version of Python to build with, using DEFAULT_VERSIONS
.endif

.if ${PYTHON_REL} < 3000

# compileall() fails on 2.x, but .py[co] files are still in --record output
post-patch:
${RM} ${WRKSRC}/gunicorn/workers/_gaiohttp.py

.if ${PYTHON_REL} < 3300 && ${PORT_OPTIONS:MGAIOHTTP}
BROKEN= GAIOHTTP requires Python 3.3+ but this port is building with Python ${PYTHON_VER}. \
Disable the GAIOHTTP option or change the version of Python to build with, using DEFAULT_VERSIONS
.endif
.endif

do-test:
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test

.include <bsd.port.post.mk>
4 changes: 2 additions & 2 deletions www/py-gunicorn/distinfo
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SHA256 (benoitc-gunicorn-18.0_GH0.tar.gz) = 1d2108101e3ea4712ed7760539d43f56675724cf02e6c407371bec05df51ca97
SIZE (benoitc-gunicorn-18.0_GH0.tar.gz) = 370772
SHA256 (benoitc-gunicorn-19.4.1_GH0.tar.gz) = 81899db60828fdd0377f1e6618859459af0cd151b70baf90ca3c76cabaf3cfe1
SIZE (benoitc-gunicorn-19.4.1_GH0.tar.gz) = 404656
6 changes: 6 additions & 0 deletions www/py-gunicorn/files/patch-requirements__test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--- requirements_test.txt.orig 2015-02-04 13:43:57 UTC
+++ requirements_test.txt
@@ -1,2 +1 @@
-pytest==2.6.3
-pytest-cov==1.7.0
+pytest>=2.6.3
5 changes: 0 additions & 5 deletions www/py-gunicorn/files/patch-requirements_dev.txt

This file was deleted.

0 comments on commit ac28e2b

Please sign in to comment.