Move all python shebangs from /usr/bin/env to python3.

The change is only relevant to development as all the call to python scripts is done
calling C++ os::python that invoques the appropriate python version.

The change is two fold, on one hand remove all the uses of /usr/bin/env for python.

On the other hand rename all the calls to python from python to python3 making it explicit
and being compliant with PEP 394 -- The "python" Command on Unix-Like Systems:
https://www.python.org/dev/peps/pep-0394/

Remove the sheebang from src/graphics/GraphicsConverter.cpp because it is not necessary.

Some small whitespace changes.
This commit is contained in:
José Matos 2018-12-29 19:14:41 +00:00
parent 6e2c86a15c
commit 3f03f0a447
15 changed files with 42 additions and 46 deletions

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
from __future__ import print_function from __future__ import print_function

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
############### ###############
import sys import sys

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
############### ###############
import sys, os, shutil import sys, os, shutil

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# file gen_lfuns.py # file gen_lfuns.py

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# file generate_symbols_images.py # file generate_symbols_images.py

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# file generate_symbols_images.py # file generate_symbols_images.py

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# file mergepo.py # file mergepo.py

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# file unciodesymbols.py # file unciodesymbols.py

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# file updatedocs.py # file updatedocs.py

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# file updatelayouts.py # file updatelayouts.py

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# file lyx_pot.py # file lyx_pot.py
@ -698,5 +698,3 @@ if __name__ == '__main__':
encodings_l10n(input_files, output, base) encodings_l10n(input_files, output, base)
else: else:
languages_l10n(input_files, output, base) languages_l10n(input_files, output, base)

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (C) 2007 Michael Gerz <michael.gerz@teststep.org> # Copyright (C) 2007 Michael Gerz <michael.gerz@teststep.org>
# Copyright (C) 2007 José Matos <jamatos@lyx.org> # Copyright (C) 2007 José Matos <jamatos@lyx.org>

View File

@ -287,8 +287,7 @@ static void build_script(string const & doc_fname,
LYXERR(Debug::GRAPHICS, "build_script ... "); LYXERR(Debug::GRAPHICS, "build_script ... ");
typedef Graph::EdgePath EdgePath; typedef Graph::EdgePath EdgePath;
script << "#!/usr/bin/env python\n" script << "# -*- coding: utf-8 -*-\n"
"# -*- coding: utf-8 -*-\n"
"import os, shutil, sys\n\n" "import os, shutil, sys\n\n"
"def unlinkNoThrow(file):\n" "def unlinkNoThrow(file):\n"
" ''' remove a file, do not throw if an error occurs '''\n" " ''' remove a file, do not throw if an error occurs '''\n"

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# file src/tex2lyx/test/runtests.py # file src/tex2lyx/test/runtests.py
@ -161,4 +161,3 @@ def getlyxinput(lyx, lyxfx, lyxf, uselyx2lyx):
if __name__ == "__main__": if __name__ == "__main__":
main(sys.argv) main(sys.argv)