From owner-svn-ports-head@FreeBSD.ORG Sat Mar 1 06:29:40 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBAD64B3; Sat, 1 Mar 2014 06:29:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E0C11C23; Sat, 1 Mar 2014 06:29:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s216TeTV010376; Sat, 1 Mar 2014 06:29:40 GMT (envelope-from sunpoet@svn.freebsd.org) Received: (from sunpoet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s216Te0b010375; Sat, 1 Mar 2014 06:29:40 GMT (envelope-from sunpoet@svn.freebsd.org) Message-Id: <201403010629.s216Te0b010375@svn.freebsd.org> From: Sunpoet Po-Chuan Hsieh Date: Sat, 1 Mar 2014 06:29:40 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r346595 - head/astro/weather X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 06:29:40 -0000 Author: sunpoet Date: Sat Mar 1 06:29:40 2014 New Revision: 346595 URL: http://svnweb.freebsd.org/changeset/ports/346595 QAT: https://qat.redports.org/buildarchive/r346595/ Log: - Fix install/package for Python 3.x Modified: head/astro/weather/Makefile Modified: head/astro/weather/Makefile ============================================================================== --- head/astro/weather/Makefile Sat Mar 1 06:13:39 2014 (r346594) +++ head/astro/weather/Makefile Sat Mar 1 06:29:40 2014 (r346595) @@ -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 + +.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 +.include