mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-02 06:03:50 +00:00
551be3c723
Ports using USE_PYTHON=distutils are now flavored. They will automatically get flavors (py27, py34, py35, py36) depending on what versions they support. There is also a USE_PYTHON=flavors for ports that do not use distutils but need FLAVORS to be set. A USE_PYTHON=noflavors can be set if using distutils but flavors are not wanted. A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been added to cope with Python ports that did not have the Python PKGNAMEPREFIX but are flavored. USES=python now also exports a PY_FLAVOR variable that contains the current python flavor. It can be used in dependency lines when the port itself is not python flavored. For example, deskutils/calibre. By default, all the flavors are generated. To only generate flavors for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf. In all the ports with Python dependencies, the *_DEPENDS entries MUST end with the flavor so that the framework knows which to build/use. This is done by appending '@${PY_FLAVOR}' after the origin (or @${FLAVOR} if in a Python module with Python flavors, as the content will be the same). For example: RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} PR: 223071 Reviewed by: portmgr, python Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D12464
61 lines
1.9 KiB
Makefile
61 lines
1.9 KiB
Makefile
# Created by: Kristaps Kulis <kristaps.kulis@gmail.com>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= gunicorn
|
|
PORTVERSION= 19.4.5
|
|
CATEGORIES= www python
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
MAINTAINER= koobs@FreeBSD.org
|
|
COMMENT= WSGI HTTP Server for UNIX
|
|
|
|
LICENSE= MIT
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${FLAVOR}
|
|
|
|
OPTIONS_DEFINE= PROCTITLE
|
|
OPTIONS_DEFAULT= PROCTITLE
|
|
OPTIONS_GROUP= WORKERS
|
|
OPTIONS_GROUP_WORKERS= EVENTLET GAIOHTTP GEVENT TORNADO
|
|
|
|
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:net/py-eventlet@${FLAVOR}
|
|
GAIOHTTP_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiohttp>0:www/py-aiohttp@${FLAVOR}
|
|
GEVENT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gevent>=0.12.2:devel/py-gevent@${FLAVOR}
|
|
PROCTITLE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setproctitle>0:devel/py-setproctitle@${FLAVOR}
|
|
TORNADO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tornado>=2.2:www/py-tornado@${FLAVOR}
|
|
|
|
USES= python
|
|
USE_GITHUB= yes
|
|
USE_PYTHON= autoplist concurrent distutils
|
|
|
|
GH_ACCOUNT= benoitc
|
|
|
|
NO_ARCH= yes
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${PYTHON_REL} < 3300
|
|
.if ${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
|
|
TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${FLAVOR}
|
|
.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
|
|
|
|
do-test:
|
|
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
|
|
|
|
.include <bsd.port.post.mk>
|