mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-25 00:51:21 +00:00
3b3772cc0f
- Use CHEESESHOP as only download site [1] - Remove leading article from COMMENT - Add LICENSE (BSD3CLAUSE) - Deprecate easy_install - Use automatic pkg-plist via PYDISTUTILS_AUTOPLIST - Convert to the new options framework - Make EXAMPLES option effective only for Python ver. < 3, due to devel/py-cheetah at the moment only for Python 2 - Add support for stage-dir - Add a post-[extract|patch] target to fix setup.py, otherwise *_AUTOPLIST fails - Fix format of WWW field in pkg-descr, and remove Author: PR: ports/186286 [1] Submitted by: Martin Tournoij <martin@arp242.net>
66 lines
1.9 KiB
Makefile
66 lines
1.9 KiB
Makefile
# Created by: Nicola Vitale <nivit@email.it>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= cherrypy
|
|
PORTVERSION= 3.2.4
|
|
PORTREVISION= 0
|
|
CATEGORIES= www python
|
|
MASTER_SITES= CHEESESHOP
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
DISTNAME= CherryPy-${PORTVERSION}
|
|
|
|
MAINTAINER= nivit@FreeBSD.org
|
|
COMMENT= Pythonic, object-oriented web development framework
|
|
|
|
LICENSE= BSD3CLAUSE
|
|
|
|
EXAMPLES_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cheetah>=2.4.4:${PORTSDIR}/devel/py-cheetah \
|
|
${PYTHON_PKGNAMEPREFIX}sqlobject>=1.5.1:${PORTSDIR}/databases/py-sqlobject
|
|
EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
|
|
|
|
OPTIONS_DEFINE= EXAMPLES
|
|
|
|
PORTEXAMPLES= *
|
|
PYDISTUTILS_AUTOPLIST= yes
|
|
|
|
USE_PYTHON= yes
|
|
USE_PYDISTUTILS= yes
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
# handle tutorial separately, and remove cherrypy.process from data_files
|
|
# otherwise it confuses build_py.get_outputs() and breaks PYDISTUTILS_AUTOPLIST
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e '89,96d' -e '68s/"cherrypy.tutorial",//1' \
|
|
-e '78d' -i.bak ${WRKSRC}/${PYSETUP}
|
|
|
|
.if ${PORT_OPTIONS:MEXAMPLES}
|
|
post-install:
|
|
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
|
(cd ${WRKSRC}/cherrypy/tutorial && \
|
|
${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
|
|
(cd ${STAGEDIR}${PREFIX} && \
|
|
${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
|
|
-d ${EXAMPLESDIR} ${EXAMPLESDIR:S,${PREFIX}/,,})
|
|
.endif
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${PYTHON_REL} >= 300 # devel/py-cheetah doesn't yet build with Python 3
|
|
.undef EXAMPLES_RUN_DEPENDS
|
|
.endif
|
|
|
|
# The package cherrypy.wsgiserver includes both Python 2 and Python 3 modules,
|
|
# so it breaks PYDISTUTILS_AUTOPLIST.
|
|
# Instead of defining a cherrypy_build_py.get_outputs() method in setup.py
|
|
# we simply remove unwanted modules (see cherrypy_build_py() in setup.py)
|
|
post-extract:
|
|
.if ${PYTHON_REL} >= 300
|
|
@(cd ${WRKSRC}/cherrypy && ${RM} _cpcompat_subprocess.py && \
|
|
cd wsgiserver && ${RM} ssl_pyopenssl.py wsgiserver2.py)
|
|
.else
|
|
@${RM} ${WRKSRC}/cherrypy/wsgiserver/wsgiserver3.py
|
|
.endif
|
|
|
|
.include <bsd.port.post.mk>
|