Properly all compileall.py.

Do it like we already do in devel/py-qt4-core: call compileall.py with -d so
that the .pyc and .pyo files do not have ${STAGEDIR} in them.

While at it, also call python with -O to generate .pyo files.
This commit is contained in:
Raphael Kubo da Costa 2015-12-13 19:58:30 +00:00
parent 3f50572b7c
commit 66b08a476e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=403686
2 changed files with 312 additions and 3 deletions

View file

@ -3,6 +3,7 @@
PORTNAME= demo PORTNAME= demo
PORTVERSION= ${PYQT4_VERSION} PORTVERSION= ${PYQT4_VERSION}
PORTREVISION= 1
PORTEPOCH= 1 PORTEPOCH= 1
CATEGORIES= misc devel python CATEGORIES= misc devel python
MASTER_SITES= ${MASTER_SITES_PYQT4} MASTER_SITES= ${MASTER_SITES_PYQT4}
@ -14,6 +15,7 @@ COMMENT= Python bindings for the Qt4 toolkit, Qt demo and examples
DISTINFO_FILE= ${PYQT4_DISTINFO_FILE} DISTINFO_FILE= ${PYQT4_DISTINFO_FILE}
NO_BUILD= yes
USES= python pyqt:4 USES= python pyqt:4
EXAMPLESDIR= ${PREFIX}/share/examples/py-qt4 EXAMPLESDIR= ${PREFIX}/share/examples/py-qt4
@ -24,12 +26,17 @@ USE_PYQT= assistant_run core_run dbus_run dbussupport_run declarative_run \
script_run scripttools_run sql_run svg_run test_run webkit_run xml_run \ script_run scripttools_run sql_run svg_run test_run webkit_run xml_run \
xmlpatterns_run sip_run qscintilla2_run xmlpatterns_run sip_run qscintilla2_run
do-build:
${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/examples
do-install: do-install:
${RM} -f ${WRKSRC}/examples/designer/plugins/plugins.py.orig ${RM} -f ${WRKSRC}/examples/designer/plugins/plugins.py.orig
${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}
post-install:
${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
-f -d ${PYTHONPREFIX_SITELIBDIR} \
${STAGEDIR}${EXAMPLESDIR}
${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
-f -d ${PYTHONPREFIX_SITELIBDIR} \
${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.mk> .include <bsd.port.mk>

File diff suppressed because it is too large Load diff