pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/python python/tool.mk: Create linux-style python[...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3ff6a749aae0
branches:  trunk
changeset: 344666:3ff6a749aae0
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun Nov 24 11:41:15 2019 +0000

description:
python/tool.mk: Create linux-style python[2/3] wrappers automatically

diffstat:

 lang/python/tool.mk |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (32 lines):

diff -r 6cd11f519ac4 -r 3ff6a749aae0 lang/python/tool.mk
--- a/lang/python/tool.mk       Sun Nov 24 11:39:00 2019 +0000
+++ b/lang/python/tool.mk       Sun Nov 24 11:41:15 2019 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: tool.mk,v 1.1 2011/10/14 08:55:54 obache Exp $
+# $NetBSD: tool.mk,v 1.2 2019/11/24 11:41:15 nia Exp $
 #
 # Create `python' interpreter wrapper for applicable Python bin.
 #
 # This mk fragment can be included in all packages that uses `python'
-# as a tool without version suffix.
+# as a tool without a pkgsrc-style version suffix.
 #
 # Keywords: python
 #
@@ -19,11 +19,12 @@
 
 .PHONY: buildlink-bin-python
 buildlink-bin-python:
+.for bin in python python${PYVERSSUFFIX:R}
        ${RUN} \
-       f="${PYTHONBIN}"; \
-       t="${BUILDLINK_DIR}/bin/python"; \
-       if ${TEST} -f $$f -a ! -f $$t ; then \
-               ${LN} -sf $$f $$t; \
+       t=${BUILDLINK_DIR}/bin/${bin}; \
+       if ${TEST} -f "${PYTHONBIN}" -a ! -f $$t; then \
+               ${LN} -sf "${PYTHONBIN}" $$t; \
        fi
+.endfor
 
 .endif # PYTHON_TOOL_MK



Home | Main Index | Thread Index | Old Index