mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-31 17:17:56 +03:00
Use #!/usr/bin/env for python scripts
This is recommended for upstream, but not for downstream, like Fedora. So change /usr/bin/env to /usr/bin/python2 at RPM install time to match the ideal Fedora config. https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython https://bugzilla.redhat.com/show_bug.cgi?id=1303282
This commit is contained in:
parent
246e3c9c59
commit
47dd38eb3e
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python2 -tt
|
||||
#!/usr/bin/env python2 -tt
|
||||
# Copyright (C) 2013, 2014 Red Hat, Inc.
|
||||
|
||||
import atexit
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python2 -tt
|
||||
#!/usr/bin/env python2 -tt
|
||||
#
|
||||
# Copyright(c) FUJITSU Limited 2007.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python2 -tt
|
||||
#!/usr/bin/env python2 -tt
|
||||
#
|
||||
# Copyright 2008, 2013, 2014 Red Hat, Inc.
|
||||
# Joey Boggs <jboggs@redhat.com>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python2 -tt
|
||||
#!/usr/bin/env python2 -tt
|
||||
#
|
||||
# Copyright 2005-2014 Red Hat, Inc.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python2 -tt
|
||||
#!/usr/bin/env python2 -tt
|
||||
#
|
||||
# Copyright (C) 2006, 2014 Red Hat, Inc.
|
||||
# Copyright (C) 2006 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
@ -106,6 +106,7 @@ machine).
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
|
||||
%build
|
||||
%if %{qemu_user}
|
||||
%global _qemu_user --qemu-user=%{qemu_user}
|
||||
@ -151,6 +152,13 @@ python setup.py \
|
||||
install -O1 --root=%{buildroot}
|
||||
%find_lang %{name}
|
||||
|
||||
# Replace '#!/usr/bin/env python2' with '#!/usr/bin/python2'
|
||||
# The format is ideal for upstream, but not a distro. See:
|
||||
# https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython
|
||||
for f in $(find %{buildroot} -type f -executable -print); do
|
||||
sed -i "1 s|^#!/usr/bin/env python2|#!%{__python2}|" $f || :
|
||||
done
|
||||
|
||||
# The conversion script was only added to virt-manager after several
|
||||
# Fedora cycles of using gsettings. Installing it now could convert old data
|
||||
# and wipe out recent settings.
|
||||
|
Loading…
Reference in New Issue
Block a user