Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Dec 2015 21:09:00 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r403164 - head/devel/py-sip
Message-ID:  <201512062109.tB6L904V055865@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rakuco
Date: Sun Dec  6 21:09:00 2015
New Revision: 403164
URL: https://svnweb.freebsd.org/changeset/ports/403164

Log:
  py-sip: Allow concurrent Python installations.
  
  Add USE_PYTHON=concurrent and make the necessary adjustments:
  - Stop setting DATADIR and DOCSDIR, they are taken care of by
    USE_PYTHON=concurrent.
  - Use Python's compileall module instead of py_compile so that Python 3
    byte-code does not contain ${STAGEDIR}.
  - Remove %%DATADIR%% from the plist, which was generated by py_compile.
  
  PR:		203734

Modified:
  head/devel/py-sip/Makefile
  head/devel/py-sip/pkg-plist

Modified: head/devel/py-sip/Makefile
==============================================================================
--- head/devel/py-sip/Makefile	Sun Dec  6 20:59:53 2015	(r403163)
+++ head/devel/py-sip/Makefile	Sun Dec  6 21:09:00 2015	(r403164)
@@ -3,6 +3,7 @@
 
 PORTNAME=	sip
 PORTVERSION=	${SIP_VERSION}
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	devel python
 MASTER_SITES=	${MASTER_SITES_SIP}
@@ -13,10 +14,8 @@ MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Python to C and C++ bindings generator
 
 USES=		python
-USE_PYTHON=	py3kplist
+USE_PYTHON=	concurrent py3kplist
 
-DATADIR=	${PREFIX}/share/py-${PORTNAME}
-DOCSDIR=	${PREFIX}/share/doc/py-${PORTNAME}
 CONFIGURE_ARGS=	-b ${PREFIX}/bin -d ${PYTHONPREFIX_SITELIBDIR} \
 		-e ${PYTHONPREFIX_INCLUDEDIR} -v ${DATADIR} \
 		CC="${CC}" CXX="${CXX}" LINK="${CXX}" LINK_SHLIB="${CXX}" \
@@ -36,11 +35,11 @@ do-configure:
 post-install:
 	${MKDIR} ${STAGEDIR}${DOCSDIR} && cd ${WRKSRC}/doc/html && \
 		${COPYTREE_SHARE} \. ${STAGEDIR}${DOCSDIR}
-	${MKDIR} ${STAGEDIR}${DATADIR} &&\
-		cd ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} &&\
-		${PYTHON_CMD} -c "import sipconfig" &&\
-		${PYTHON_CMD} -O -c "import sipconfig" &&\
-		${PYTHON_CMD} -c "import sipdistutils" &&\
-		${PYTHON_CMD} -O -c "import sipdistutils"
+	${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
+		-f -d ${PYTHONPREFIX_SITELIBDIR} \
+		${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+	${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
+		-f -d ${PYTHONPREFIX_SITELIBDIR} \
+		${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
 
 .include <bsd.port.mk>

Modified: head/devel/py-sip/pkg-plist
==============================================================================
--- head/devel/py-sip/pkg-plist	Sun Dec  6 20:59:53 2015	(r403163)
+++ head/devel/py-sip/pkg-plist	Sun Dec  6 21:09:00 2015	(r403164)
@@ -7,4 +7,3 @@ bin/sip
 %%PYTHON_SITELIBDIR%%/sipdistutils.py
 %%PYTHON_SITELIBDIR%%/sipdistutils.pyc
 %%PYTHON_SITELIBDIR%%/sipdistutils.pyo
-@dir %%DATADIR%%



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