Fix Python files:

* Prefer python2 to python that may point on python3 on modern installs.
* Fix indent/spaces consistency.
This commit is contained in:
Félix Piédallu
2018-01-10 13:38:36 +01:00
committed by Jehan
parent 769325e51b
commit 2265701268
19 changed files with 93 additions and 90 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# Foreground Extraction Benchmark # Foreground Extraction Benchmark
# Copyright 2005 Sven Neumann <sven@gimp.org> # Copyright 2005 Sven Neumann <sven@gimp.org>

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# Gimp-Python - allows the writing of Gimp plugins in Python. # Gimp-Python - allows the writing of Gimp plugins in Python.
# Copyright (C) 1997 James Henstridge <james@daa.com.au> # Copyright (C) 1997 James Henstridge <james@daa.com.au>

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# Gimp-Python - allows the writing of Gimp plugins in Python. # Gimp-Python - allows the writing of Gimp plugins in Python.
# Copyright (C) 2003, 2005 Manish Singh <yosh@gimp.org> # Copyright (C) 2003, 2005 Manish Singh <yosh@gimp.org>

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# GIMP Plug-in for the OpenRaster file format # GIMP Plug-in for the OpenRaster file format
# http://create.freedesktop.org/wiki/OpenRaster # http://create.freedesktop.org/wiki/OpenRaster

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# Gimp-Python - allows the writing of Gimp plugins in Python. # Gimp-Python - allows the writing of Gimp plugins in Python.
# Copyright (C) 1997 James Henstridge <james@daa.com.au> # Copyright (C) 1997 James Henstridge <james@daa.com.au>

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
#coding: utf-8 #coding: utf-8
# #

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
#Copyright (c) Manish Singh #Copyright (c) Manish Singh

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# Gimp-Python - allows the writing of Gimp plugins in Python. # Gimp-Python - allows the writing of Gimp plugins in Python.
# Copyright (C) 1997 James Henstridge <james@daa.com.au> # Copyright (C) 1997 James Henstridge <james@daa.com.au>

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# Gimp-Python - allows the writing of Gimp plugins in Python. # Gimp-Python - allows the writing of Gimp plugins in Python.
# Copyright (C) 2006 Manish Singh <yosh@gimp.org> # Copyright (C) 2006 Manish Singh <yosh@gimp.org>

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# Gimp-Python - allows the writing of Gimp plugins in Python. # Gimp-Python - allows the writing of Gimp plugins in Python.
# Copyright (C) 1997 James Henstridge <james@daa.com.au> # Copyright (C) 1997 James Henstridge <james@daa.com.au>

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# Gimp-Python - allows the writing of Gimp plugins in Python. # Gimp-Python - allows the writing of Gimp plugins in Python.
# Copyright (C) 1997 James Henstridge <james@daa.com.au> # Copyright (C) 1997 James Henstridge <james@daa.com.au>

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
# Gimp-Python - allows the writing of Gimp plugins in Python. # Gimp-Python - allows the writing of Gimp plugins in Python.
# Copyright (C) 1997 James Henstridge <james@daa.com.au> # Copyright (C) 1997 James Henstridge <james@daa.com.au>

View File

@ -2,8 +2,13 @@
# called as "py-compile [--basedir DIR] PY_FILES ... # called as "py-compile [--basedir DIR] PY_FILES ...
if [ -z "$PYTHON" ]; then if [ -z "$PYTHON" ]; then
if [[ -x "$(command -v python2)" ]]; then
PYTHON=python2
else
# Let's hope it's Python2
PYTHON=python PYTHON=python
fi fi
fi
basedir= basedir=
@ -65,4 +70,3 @@ for file in string.split(files):
sys.stdout.flush() sys.stdout.flush()
py_compile.compile(path) py_compile.compile(path)
print" 2>/dev/null || : print" 2>/dev/null || :

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
""" """
defcheck.py -- Consistency check for the .def files. defcheck.py -- Consistency check for the .def files.

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
import sys,re import sys,re
@ -115,4 +115,3 @@ path = Path()
path.readgimpfile (infile) path.readgimpfile (infile)
path.makesvg() path.makesvg()
path.writesvgfile (outfile) path.writesvgfile (outfile)

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python2
""" """
module-dependencies.py -- GIMP library and core module dependency constructor module-dependencies.py -- GIMP library and core module dependency constructor