Replace PYTHONSHEBANG with valid shebang

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>
This commit is contained in:
Christian Heimes committed 2019-06-24 09:35:57 +02:00
1 parent d86b57c057
commit 6d02eddd3e
54 files changed
+54 -54

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
# special handling of Python scripts with auto-generated shebang line # special handling of Python scripts with auto-generated shebang line
$(PYTHON_SHEBANG):%: %.in Makefile $(PYTHON_SHEBANG):%: %.in Makefile
$(AM_V_GEN)sed -e 's|@PYTHONSHEBANG[@]|#!$(PYTHON) -E|g' $< > $@ $(AM_V_GEN)sed -e 's|^#!/usr/bin/python3.*|#!$(PYTHON) -E|g' $< > $@
$(AM_V_GEN)chmod +x $@ $(AM_V_GEN)chmod +x $@
.PHONY: python_scripts_sub .PHONY: python_scripts_sub
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Jan Cholasta <jcholast@redhat.com> # Authors: Jan Cholasta <jcholast@redhat.com>
# #
# Copyright (C) 2014 Red Hat # Copyright (C) 2014 Red Hat
Executable → Regular
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Authors: # Authors:
# Rob Crittenden <rcritten@redhat.com> # Rob Crittenden <rcritten@redhat.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Simo Sorce <ssorce@redhat.com> # Authors: Simo Sorce <ssorce@redhat.com>
# Karl MacMillan <kmacmillan@mentalrootkit.com> # Karl MacMillan <kmacmillan@mentalrootkit.com>
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license # Copyright (C) 2014 FreeIPA Contributors see COPYING for license
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license # Copyright (C) 2014 FreeIPA Contributors see COPYING for license
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license # Copyright (C) 2014 FreeIPA Contributors see COPYING for license
# #
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Authors: # Authors:
# Jan Cholasta <jcholast@redhat.com> # Jan Cholasta <jcholast@redhat.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Authors: # Authors:
# Jan Cholasta <jcholast@redhat.com> # Jan Cholasta <jcholast@redhat.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2019 IPA Project Contributors, see COPYING for license # Copyright (C) 2019 IPA Project Contributors, see COPYING for license
# #
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2019 IPA Project Contributors, see COPYING for license # Copyright (C) 2019 IPA Project Contributors, see COPYING for license
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2019 IPA Project Contributors, see COPYING for license # Copyright (C) 2019 IPA Project Contributors, see COPYING for license
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2019 IPA Project Contributors, see COPYING for license # Copyright (C) 2019 IPA Project Contributors, see COPYING for license
# #
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
from ipaserver import dcerpc from ipaserver import dcerpc
from ipaserver.install.installutils import is_ipa_configured, ScriptError from ipaserver.install.installutils import is_ipa_configured, ScriptError
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Authors: # Authors:
# Rob Crittenden <rcritten@redhat.com> # Rob Crittenden <rcritten@redhat.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license # Copyright (C) 2017 FreeIPA Contributors see COPYING for license
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Authors: # Authors:
# Rob Crittenden <rcritten@redhat.com> # Rob Crittenden <rcritten@redhat.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license # Copyright (C) 2015 FreeIPA Contributors see COPYING for license
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Authors: # Authors:
# Rob Crittenden <rcritten@redhat.com> # Rob Crittenden <rcritten@redhat.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Authors: # Authors:
# Rob Crittenden <rcritten@redhat.com> # Rob Crittenden <rcritten@redhat.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Authors: # Authors:
# Rob Crittenden <rcritten@redhat.com> # Rob Crittenden <rcritten@redhat.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Authors: Sumit Bose <sbose@redhat.com> # Authors: Sumit Bose <sbose@redhat.com>
# Based on ipa-server-install by Karl MacMillan <kmacmillan@mentalrootkit.com> # Based on ipa-server-install by Karl MacMillan <kmacmillan@mentalrootkit.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Tomas Babej <tbabej@redhat.com> # Authors: Tomas Babej <tbabej@redhat.com>
# #
# Copyright (C) 2013 Red Hat # Copyright (C) 2013 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com> # Authors: Rob Crittenden <rcritten@redhat.com>
# #
# Copyright (C) 2013 Red Hat # Copyright (C) 2013 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com> # Authors: Rob Crittenden <rcritten@redhat.com>
# #
# Copyright (C) 2011 Red Hat # Copyright (C) 2011 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Jan Cholasta <jcholast@redhat.com> # Authors: Jan Cholasta <jcholast@redhat.com>
# #
# Copyright (C) 2014 Red Hat # Copyright (C) 2014 Red Hat
Executable → Regular
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2019 FreeIPA Contributors see COPYING for license # Copyright (C) 2019 FreeIPA Contributors see COPYING for license
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com> # Authors: Rob Crittenden <rcritten@redhat.com>
# Authors: Simo Sorce <ssorce@redhat.com> # Authors: Simo Sorce <ssorce@redhat.com>
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2019 FreeIPA Contributors see COPYING for license # Copyright (C) 2019 FreeIPA Contributors see COPYING for license
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com> # Authors: Rob Crittenden <rcritten@redhat.com>
# #
# Based on ipa-replica-manage by Karl MacMillan <kmacmillan@mentalrootkit.com> # Based on ipa-replica-manage by Karl MacMillan <kmacmillan@mentalrootkit.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
"""Test client for ipa-custodia """Test client for ipa-custodia
The test script is expected to be executed on an IPA server with existing The test script is expected to be executed on an IPA server with existing
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Copyright (C) 2017 IPA Project Contributors, see COPYING for license # Copyright (C) 2017 IPA Project Contributors, see COPYING for license
from ipaserver.secrets.service import main from ipaserver.secrets.service import main
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Martin Nagy <mnagy@redhat.com> # Authors: Martin Nagy <mnagy@redhat.com>
# Based on ipa-server-install by Karl MacMillan <kmacmillan@mentalrootkit.com> # Based on ipa-server-install by Karl MacMillan <kmacmillan@mentalrootkit.com>
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: # Authors:
# Christian Heimes <cheimes@redhat.com> # Christian Heimes <cheimes@redhat.com>
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Ade Lee <alee@redhat.com> # Authors: Ade Lee <alee@redhat.com>
# #
# Copyright (C) 2014 Red Hat # Copyright (C) 2014 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com> # Authors: Rob Crittenden <rcritten@redhat.com>
# #
# Copyright (C) 2008 Red Hat # Copyright (C) 2008 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Jr Aquino <jr.aquino@citrix.com> # Authors: Jr Aquino <jr.aquino@citrix.com>
# #
# Copyright (C) 2011 Red Hat # Copyright (C) 2011 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com> # Authors: Rob Crittenden <rcritten@redhat.com>
# Authors: Simo Sorce <ssorce@redhat.com> # Authors: Simo Sorce <ssorce@redhat.com>
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Nathaniel McCallum <npmccallum@redhat.com> # Authors: Nathaniel McCallum <npmccallum@redhat.com>
# #
# Copyright (C) 2014 Red Hat # Copyright (C) 2014 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
from __future__ import print_function from __future__ import print_function
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
"""Wait until pki-tomcatd is up """Wait until pki-tomcatd is up
The script polls on Dogtag's HTTP port and wait until the admin interface The script polls on Dogtag's HTTP port and wait until the admin interface
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license # Copyright (C) 2017 FreeIPA Contributors see COPYING for license
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Martin Kosek <mkosek@redhat.com> # Authors: Martin Kosek <mkosek@redhat.com>
# #
# Copyright (C) 2011 Red Hat # Copyright (C) 2011 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com> # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
# #
# Copyright (C) 2007 Red Hat # Copyright (C) 2007 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com> # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
# #
# Copyright (C) 2007 Red Hat # Copyright (C) 2007 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Rob Crittenden <rcritten@redhat.com> # Authors: Rob Crittenden <rcritten@redhat.com>
# #
# Copyright (C) 2013 Red Hat # Copyright (C) 2013 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Jan Cholasta <jcholast@redhat.com> # Authors: Jan Cholasta <jcholast@redhat.com>
# #
# Copyright (C) 2013 Red Hat # Copyright (C) 2013 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com> # Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
# Simo Sorce <ssorce@redhat.com> # Simo Sorce <ssorce@redhat.com>
# Rob Crittenden <rcritten@redhat.com> # Rob Crittenden <rcritten@redhat.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# #
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license # Copyright (C) 2015 FreeIPA Contributors see COPYING for license
# #
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Tomas Babej <tbabej@redhat.com> # Authors: Tomas Babej <tbabej@redhat.com>
# #
# Copyright (C) 2015 Red Hat # Copyright (C) 2015 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: Simo Sorce <ssorce@redhat.com> # Authors: Simo Sorce <ssorce@redhat.com>
# #
# Copyright (C) 2008-2010 Red Hat # Copyright (C) 2008-2010 Red Hat
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: # Authors:
# Jason Gerard DeRose <jderose@redhat.com> # Jason Gerard DeRose <jderose@redhat.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: # Authors:
# Petr Viktorin <pviktori@redhat.com> # Petr Viktorin <pviktori@redhat.com>
# John Dennis <jdennis@redhat.com> # John Dennis <jdennis@redhat.com>
+1 -1
View File
@@ -1,4 +1,4 @@
@PYTHONSHEBANG@ #!/usr/bin/python3
# Authors: # Authors:
# Rob Crittenden <rcritten@redhat.com> # Rob Crittenden <rcritten@redhat.com>
# John Dennis <jdennis@redhat.com> # John Dennis <jdennis@redhat.com>