pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/python Add make fragment for easy to use python a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8e5736f6baae
branches:  trunk
changeset: 593812:8e5736f6baae
user:      obache <obache%pkgsrc.org@localhost>
date:      Fri Oct 14 08:55:54 2011 +0000

description:
Add make fragment for easy to use python as tool.

diffstat:

 lang/python/tool.mk |  29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diffs (33 lines):

diff -r 12fd9ffa22fb -r 8e5736f6baae lang/python/tool.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python/tool.mk       Fri Oct 14 08:55:54 2011 +0000
@@ -0,0 +1,29 @@
+# $NetBSD: tool.mk,v 1.1 2011/10/14 08:55:54 obache 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.
+#
+# Keywords: python
+#
+
+.if !defined(PYTHON_TOOL_MK)
+PYTHON_TOOL_MK=        defined
+
+.if !defined(PYTHON_PYVERSION_MK)
+.include "../../lang/python/pyversion.mk"
+.endif
+
+BUILDLINK_TARGETS+=    buildlink-bin-python
+
+.PHONY: buildlink-bin-python
+buildlink-bin-python:
+       ${RUN} \
+       f="${PYTHONBIN}"; \
+       t="${BUILDLINK_DIR}/bin/python"; \
+       if ${TEST} -f $$f -a ! -f $$t ; then \
+               ${LN} -sf $$f $$t; \
+       fi
+
+.endif # PYTHON_TOOL_MK



Home | Main Index | Thread Index | Old Index