pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/python python/wheel.mk: add PLIST code for pyc/pyo
details: https://anonhg.NetBSD.org/pkgsrc/rev/148e2ab173c0
branches: trunk
changeset: 372488:148e2ab173c0
user: wiz <wiz%pkgsrc.org@localhost>
date: Tue Jan 25 13:21:21 2022 +0000
description:
python/wheel.mk: add PLIST code for pyc/pyo
TODO: clean up/merge with extension.mk
diffstat:
lang/python/wheel.mk | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 41f219822e36 -r 148e2ab173c0 lang/python/wheel.mk
--- a/lang/python/wheel.mk Tue Jan 25 13:12:49 2022 +0000
+++ b/lang/python/wheel.mk Tue Jan 25 13:21:21 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: wheel.mk,v 1.3 2022/01/13 21:23:25 wiz Exp $
+# $NetBSD: wheel.mk,v 1.4 2022/01/25 13:21:21 wiz Exp $
#
# Initial mk for building and installing python wheels
#
@@ -54,6 +54,19 @@
PLIST_SUBST+= PYSITELIB=${PYSITELIB}
PLIST_SUBST+= WHEEL_INFODIR=${_WHEEL_INFODIR}
+# from extension.mk
+
+# Python>=3.2 bytecode file location change
+# http://www.python.org/dev/peps/pep-3147/
+.if empty(_PYTHON_VERSION:M2?)
+PLIST_AWK+= -f ${PKGSRCDIR}/lang/python/plist-python.awk
+PLIST_AWK_ENV+= PYVERS="${PYVERSSUFFIX:S/.//}"
+EARLY_PRINT_PLIST_AWK+= /^[^@]/ && /[^\/]+\.py[co]$$/ {
+EARLY_PRINT_PLIST_AWK+= gsub(/__pycache__\//, "")
+EARLY_PRINT_PLIST_AWK+= gsub(/opt-1\.pyc$$/, "pyo")
+EARLY_PRINT_PLIST_AWK+= gsub(/\.cpython-${_PYTHON_VERSION}/, "")}
+.endif
+
PRINT_PLIST_AWK+= { gsub(/${_WHEEL_INFODIR:S,.,\.,g}/, "$${WHEEL_INFODIR}") }
INSTALL_ENV+= PIP_NO_CACHEDIR=1
Home |
Main Index |
Thread Index |
Old Index