1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

www/py-gunicorn: Refactor OPTIONS and modernise

- Enable STAGE support
- Refactor OPTIONS and group WORKER options
- Tweak OPTIONS descriptions
- Use OPTIONS helpers
- Switch easy_install to install
- OPTIONSFILE is no longer needed
- Remove NO_OPTIONS_SORT
- Switch TEST_DEPENDS to a BUILD_ not RUN_ time DEPENDS
This commit is contained in:
Kubilay Kocak 2014-01-10 09:29:28 +00:00
parent 43ce726eae
commit b40822e3c5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=339338

View File

@ -3,6 +3,7 @@
PORTNAME= gunicorn
PORTVERSION= 18.0
PORTREVISION= 1
CATEGORIES= www python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -13,47 +14,30 @@ LICENSE= MIT
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest
OPTIONS_DEFINE= SETPROC TESTS
OPTIONS_GROUP= WORKERS
OPTIONS_GROUP_WORKERS= EVENTLET 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_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}eventlet>=0.9.7:${PORTSDIR}/net/py-eventlet
GEVENT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gevent>=0.12.2:${PORTSDIR}/devel/py-gevent
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
USE_PYTHON= yes
USE_PYDISTUTILS= easy_install
USE_PYDISTUTILS= yes
PYDISTUTILS_AUTOPLIST= yes
GH_ACCOUNT= benoitc
GH_COMMIT= 24fe380
OPTIONS_DEFINE= EVENTLET GEVENT TORNADO SETPROC TESTS
EVENTLET_DESC= Add Eventlet async worker
GEVENT_DESC= Add Gevent async worker
TORNADO_DESC= Add Tornado async worker
SETPROC_DESC= Support changing process title (setproctitle)
TESTS_DESC= Install pytest for unit tests
OPTIONSFILE?= ${PORT_DBDIR}/py-${PORTNAME}/options
NO_OPTIONS_SORT= yes
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MEVENTLET}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}eventlet>=0.9.7:${PORTSDIR}/net/py-eventlet
.endif
.if ${PORT_OPTIONS:MGEVENT}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}gevent>=0.12.2:${PORTSDIR}/devel/py-gevent
.endif
.if ${PORT_OPTIONS:MTORNADO}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tornado>=2.2:${PORTSDIR}/www/py-tornado
.endif
.if ${PORT_OPTIONS:MSETPROC}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setproctitle>0:${PORTSDIR}/devel/py-setproctitle
.endif
.if ${PORT_OPTIONS:MTESTS}
RUN_DEPENDS+= ${TEST_DEPENDS}
.endif
regression-test: build
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test