Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Apr 2014 23:03:36 +0000 (UTC)
From:      Nicola Vitale <nivit@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r350183 - head/www/py-cherrypy
Message-ID:  <201404042303.s34N3aIN044584@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nivit
Date: Fri Apr  4 23:03:36 2014
New Revision: 350183
URL: http://svnweb.freebsd.org/changeset/ports/350183
QAT: https://qat.redports.org/buildarchive/r350183/

Log:
  - Update to 3.2.4  [1]
  - 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>

Deleted:
  head/www/py-cherrypy/pkg-plist
Modified:
  head/www/py-cherrypy/Makefile
  head/www/py-cherrypy/distinfo
  head/www/py-cherrypy/pkg-descr

Modified: head/www/py-cherrypy/Makefile
==============================================================================
--- head/www/py-cherrypy/Makefile	Fri Apr  4 23:01:42 2014	(r350182)
+++ head/www/py-cherrypy/Makefile	Fri Apr  4 23:03:36 2014	(r350183)
@@ -2,44 +2,64 @@
 # $FreeBSD$
 
 PORTNAME=	cherrypy
-PORTVERSION=	3.2.2
+PORTVERSION=	3.2.4
 PORTREVISION=	0
 CATEGORIES=	www python
-MASTER_SITES=	http://download.cherrypy.org/cherrypy/${PORTVERSION}/ \
-		http://nivi.interfree.it/distfiles/${PORTNAME}/
+MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 DISTNAME=	CherryPy-${PORTVERSION}
 
 MAINTAINER=	nivit@FreeBSD.org
-COMMENT=	A pythonic, object-oriented web development framework
+COMMENT=	Pythonic, object-oriented web development framework
 
-.if !defined(NOPORTEXAMPLES)
-RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}cheetah>=2.0.1:${PORTSDIR}/devel/py-cheetah
+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}
-.endif
+
+OPTIONS_DEFINE=	EXAMPLES
+
+PORTEXAMPLES=	*
+PYDISTUTILS_AUTOPLIST=	yes
 
 USE_PYTHON=	yes
-USE_PYDISTUTILS=	easy_install
-PYDISTUTILS_PKGNAME=	CherryPy
+USE_PYDISTUTILS=	yes
+
+.include <bsd.port.options.mk>
 
-PLIST_SUB=	PY2=${PY2} PYMAJORVER=${PYMAJORVER}
+# 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}
 
-PYMAJORVER=	${PYTHON_VER:R}
+.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
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
-post-install:
-.if !defined(NOPORTEXAMPLES)
-	${MKDIR} ${EXAMPLESDIR}
-	cd ${PYTHONPREFIX_SITELIBDIR}/${PYEASYINSTALL_EGG}/${PORTNAME} && ${COPYTREE_SHARE} tutorial ${EXAMPLESDIR}
+.if ${PYTHON_REL} >= 300    # devel/py-cheetah doesn't yet build with Python 3
+.undef EXAMPLES_RUN_DEPENDS
 .endif
-	${RM} -R ${PYTHONPREFIX_SITELIBDIR}/${PYEASYINSTALL_EGG}/${PORTNAME}/tutorial
-.if ${PYMAJORVER} == 2
-PY2=''
+
+# 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
-PY2='@comment '
+	@${RM} ${WRKSRC}/cherrypy/wsgiserver/wsgiserver3.py
 .endif
 
 .include <bsd.port.post.mk>

Modified: head/www/py-cherrypy/distinfo
==============================================================================
--- head/www/py-cherrypy/distinfo	Fri Apr  4 23:01:42 2014	(r350182)
+++ head/www/py-cherrypy/distinfo	Fri Apr  4 23:03:36 2014	(r350183)
@@ -1,2 +1,2 @@
-SHA256 (CherryPy-3.2.2.tar.gz) = dc5a88562795c2ee462dac5b37aba1cf4f34f3e27281ec11049227039308b691
-SIZE (CherryPy-3.2.2.tar.gz) = 414099
+SHA256 (CherryPy-3.2.4.tar.gz) = abd73a449936740e99d3a05eb89b9381dc188ef696904f585463bc28079f1288
+SIZE (CherryPy-3.2.4.tar.gz) = 424074

Modified: head/www/py-cherrypy/pkg-descr
==============================================================================
--- head/www/py-cherrypy/pkg-descr	Fri Apr  4 23:01:42 2014	(r350182)
+++ head/www/py-cherrypy/pkg-descr	Fri Apr  4 23:03:36 2014	(r350183)
@@ -8,5 +8,4 @@ CherryPy is now more than three years ol
 fast and stable. It is being used in production by many sites, from
 the simplest ones to the most demanding ones.
 
-Author:	CherryPy Team <team@cherrypy.org>
-WWW:	http://www.cherrypy.org/
+WWW: http://www.cherrypy.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404042303.s34N3aIN044584>