From owner-svn-ports-all@freebsd.org Mon Sep 14 12:26:29 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B53A9CABCF; Mon, 14 Sep 2015 12:26:29 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C6321074; Mon, 14 Sep 2015 12:26:29 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8ECQTVT055460; Mon, 14 Sep 2015 12:26:29 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8ECQTEC055459; Mon, 14 Sep 2015 12:26:29 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201509141226.t8ECQTEC055459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: antoine set sender to antoine@FreeBSD.org using -f From: Antoine Brodin Date: Mon, 14 Sep 2015 12:26:29 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r396897 - head/Mk/Uses X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2015 12:26:29 -0000 Author: antoine Date: Mon Sep 14 12:26:28 2015 New Revision: 396897 URL: https://svnweb.freebsd.org/changeset/ports/396897 Log: Since PEP 0488 and python 3.5, pyo files are eliminated and bytecode files for level 1 optimization have opt-1.pyc extension Adjust USE_PYTHON=py3kplist to handle this Tested by: koobs Modified: head/Mk/Uses/python.mk Modified: head/Mk/Uses/python.mk ============================================================================== --- head/Mk/Uses/python.mk Mon Sep 14 12:20:10 2015 (r396896) +++ head/Mk/Uses/python.mk Mon Sep 14 12:26:28 2015 (r396897) @@ -509,14 +509,19 @@ add-plist-pymod: # of TMPPLIST that end with .py[co], so that they conform # to PEP 3147 (see http://www.python.org/dev/peps/pep-3147/) PYMAGICTAG= ${PYTHON_CMD} -c 'import imp; print(imp.get_tag())' +.if ${PYTHON_REL} < 3500 +PYOEXTENSION= pyo +.else +PYOEXTENSION= opt-1.pyc +.endif add-plist-post: @${AWK} '\ - /\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.py[co]$$/, "." mt "&"); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \ + /\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.pyc$$/, "." mt "&"); sub(/\.pyo$$/, "." mt "." pyo); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \ /^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ /^@dirrmtry / {d = substr($$0, 11); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ {print} \ ' \ - pc="__pycache__" mt="$$(${PYMAGICTAG})" \ + pc="__pycache__" mt="$$(${PYMAGICTAG})" pyo="${PYOEXTENSION}" \ ${TMPPLIST} > ${TMPPLIST}.pyc_tmp @${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST} .endif # ${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST)