mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-22 23:23:30 -06:00
6d02eddd3e
Replace the @PYTHONSHEBANG@ substitution with a valid #!/usr/bin/python3 shebang. This turns Python .in files into valid Python files. The files can now be checked with pylint and IDEs recognize the files as Python files. The shebang is still replaced with "#!$(PYTHON) -E" to support platform-python. Related: https://pagure.io/freeipa/issue/7984 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Francois Cami <fcami@redhat.com>
8 lines
265 B
Makefile
8 lines
265 B
Makefile
# special handling of Python scripts with auto-generated shebang line
|
|
$(PYTHON_SHEBANG):%: %.in Makefile
|
|
$(AM_V_GEN)sed -e 's|^#!/usr/bin/python3.*|#!$(PYTHON) -E|g' $< > $@
|
|
$(AM_V_GEN)chmod +x $@
|
|
|
|
.PHONY: python_scripts_sub
|
|
python_scripts_sub: $(PYTHON_SHEBANG)
|