Fixup fromcvs/togit conversion
[pkgsrcv2.git] / lang / python / application.mk
1 # $NetBSD: application.mk,v 1.9 2007/02/20 11:30:43 rillig Exp $
2 #
3 # Replace the #! interpreter for Python scripts.
4 #
5 # This mk fragment should be included in all python packages that
6 # install python scripts, or at least those that don't use setuptools
7 # or some other mechanism to set the real path.  Specifically, it is
8 # reasonable to include both egg.mk and application.mk.
9 #
10 # Package-settable variables:
11 #
12 # REPLACE_PYTHON
13 #       A list of Python scripts to be installed, relative to ${WRKSRC}.
14 #
15 # PYTHON_PATCH_SCRIPTS
16 #       The same as REPLACE_PYTHON.
17 #
18 # Keywords: python
19 #
20
21 .include "../../lang/python/pyversion.mk"
22
23 .if defined(PYTHON_PATCH_SCRIPTS) || defined(REPLACE_PYTHON)
24 REPLACE_INTERPRETER+=   python
25 REPLACE.python.old=     .*python[^ ]*
26 REPLACE.python.new=     ${PYTHONBIN}
27 REPLACE_FILES.python=   ${PYTHON_PATCH_SCRIPTS} ${REPLACE_PYTHON}
28 .endif