Revert the removal of 2to3 stuff in r437424

Reported by:	Vladimir Krstulja <vlad-fbsd@acheronmedia.com>
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2017-04-04 07:57:09 +00:00
parent f8837eae23
commit c02ca0e16b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=437710

View file

@ -31,6 +31,9 @@ BABEL_DESC= Enable Babel extension
BABEL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Babel>=1.3:devel/py-babel
PY2TO3_CMD= ${LOCALBASE}/bin/2to3-${PYTHON_VER}
PY2TO3_ARGS= --fix=all --no-diffs --nobackups --verbose --write
.include <bsd.port.pre.mk>
.if ${PKGNAMESUFFIX} == "-doc"
@ -51,6 +54,9 @@ do-install:
.if ${PORT_OPTIONS:MEXAMPLES}
PORTEXAMPLES= *
post-build:
. if ${PYTHON_REL} >= 3000
${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/examples
. endif
${PYTHON_CMD} -m compileall ${WRKSRC}/examples ; \
${PYTHON_CMD} -O -m compileall ${WRKSRC}/examples