diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2014-03-01 14:29:40 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2014-03-01 14:29:40 +0800 |
commit | 3380361f701fe3cec58415263122c84a92b62d73 (patch) | |
tree | 8ac4ceb2e9b16f8082871ec18663ec6025f11f85 /astro | |
parent | 70b55b55b5b37c3a0ea677f1464ee9f8ec8ffe41 (diff) | |
download | freebsd-ports-gnome-3380361f701fe3cec58415263122c84a92b62d73.tar.gz freebsd-ports-gnome-3380361f701fe3cec58415263122c84a92b62d73.tar.zst freebsd-ports-gnome-3380361f701fe3cec58415263122c84a92b62d73.zip |
- Fix install/package for Python 3.x
Diffstat (limited to 'astro')
-rw-r--r-- | astro/weather/Makefile | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/astro/weather/Makefile b/astro/weather/Makefile index 39f8497df8a9..23e9c5a0a391 100644 --- a/astro/weather/Makefile +++ b/astro/weather/Makefile @@ -19,8 +19,6 @@ USES= shebangfix PLIST_FILES= bin/${PORTNAME} \ %%PYTHON_SITELIBDIR%%/${PORTNAME}.py \ - %%PYTHON_SITELIBDIR%%/${PORTNAME}.pyc \ - %%PYTHON_SITELIBDIR%%/${PORTNAME}.pyo \ man/man1/${PORTNAME}.1.gz \ man/man5/${PORTNAME}rc.5.gz PORTDATA= airports places stations zctas zones @@ -29,14 +27,29 @@ SHEBANG_FILES= ${PORTNAME} python_OLD_CMD= ${SETENV} python python_CMD= ${PYTHON_CMD} +.include <bsd.port.pre.mk> + +.if ${PYTHON_REL} < 320 +PYCACHE_DIR= # empty +PYCACHE_FILE= ${PORTNAME} +.else +PYCACHE_DIR= __pycache__/ +PYCACHE_FILE= ${PORTNAME}.cpython-${PYTHON_SUFFIX} +.endif + +PLIST_FILES+= %%PYTHON_SITELIBDIR%%/${PYCACHE_DIR}${PYCACHE_FILE}.pyc \ + %%PYTHON_SITELIBDIR%%/${PYCACHE_DIR}${PYCACHE_FILE}.pyo + do-build: @${PYTHON_CMD} -m compileall ${WRKSRC}/${PORTNAME}.py @${PYTHON_CMD} -O -m compileall ${WRKSRC}/${PORTNAME}.py do-install: - ${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/ + ${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/ ${STAGEDIR}${PYTHON_SITELIBDIR}/${PYCACHE_DIR} ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} - cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTNAME}.py ${PORTNAME}.pyc ${PORTNAME}.pyo ${STAGEDIR}${PYTHON_SITELIBDIR}/ + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.py ${STAGEDIR}${PYTHON_SITELIBDIR}/ + ${INSTALL_DATA} ${WRKSRC}/${PYCACHE_DIR}${PYCACHE_FILE}.pyc ${STAGEDIR}${PYTHON_SITELIBDIR}/${PYCACHE_DIR} + ${INSTALL_DATA} ${WRKSRC}/${PYCACHE_DIR}${PYCACHE_FILE}.pyo ${STAGEDIR}${PYTHON_SITELIBDIR}/${PYCACHE_DIR} ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1/${PORTNAME}.1 ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}rc.5 ${STAGEDIR}${MANPREFIX}/man/man5/${PORTNAME}rc.5 ${MKDIR} ${STAGEDIR}${DATADIR}/ @@ -48,4 +61,4 @@ do-install: @${ECHO_MSG} "setpath = ${DATADIR}" @${ECHO_MSG} "" -.include <bsd.port.mk> +.include <bsd.port.post.mk> |