Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Nov 2016 10:23:38 +0000 (UTC)
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r425940 - head/devel/py-twisted
Message-ID:  <201611121023.uACANcLg060243@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Sat Nov 12 10:23:38 2016
New Revision: 425940
URL: https://svnweb.freebsd.org/changeset/ports/425940

Log:
  devel/py-twisted: Allow building with Python 3.x
  
  Twisted is in the midst of a porting (to Python 3) effort [1][2] and
  it should accordingly be easier for users to both test and use
  Twisted on FreeBSD built with Python 3.x.
  
  This change removes to Python 2.x limitation to the port and
  enables multiple version (Python 2 and 3) concurrent installation.
  
  While I'm here:
  
   - Switch to autoplist and remove entry removing *.c files.
   - Conditionally strip shared libraries depending on Python version.
   - Add test target.
  
  [1] https://twistedmatrix.com/documents/current/core/howto/python3.html
  [2] See Also: Unported modules list: WRKSRC/twisted/python/_setup.py
  
  Approved by:	python (with hat)
  MFH:		2016Q4

Deleted:
  head/devel/py-twisted/pkg-plist
Modified:
  head/devel/py-twisted/Makefile

Modified: head/devel/py-twisted/Makefile
==============================================================================
--- head/devel/py-twisted/Makefile	Sat Nov 12 10:19:51 2016	(r425939)
+++ head/devel/py-twisted/Makefile	Sat Nov 12 10:23:38 2016	(r425940)
@@ -3,6 +3,7 @@
 
 PORTNAME=	twisted
 PORTVERSION=	16.4.1
+PORTREVISION=	1
 CATEGORIES=	devel net python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -16,13 +17,20 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}zope.interface>=3.6.0:devel/py-zope.interface
 
-USES=		python:2 tar:bzip2
-USE_PYTHON=	distutils
+# Actually 2.7,3.3+
+USES=		python tar:bzip2
+USE_PYTHON=	autoplist concurrent distutils
+
+.include <bsd.port.pre.mk>
 
 post-install:
-	${FIND} ${STAGEDIR}${PREFIX}/lib -name "*.c" -and -exec ${RM} {} \;
+.if ${PYTHON_REL} < 3000
 	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/twisted/python/_sendmsg.so
-	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/twisted/test/raiser.so
 	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/twisted/runner/portmap.so
+.endif
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/twisted/test/raiser.so
+
+do-test:
+	@cd ${WRKSRC} && ${PYTHON_CMD} -m twisted.trial -e twisted
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>



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