Tools: Unify string quoting in the Python sources
This commit is contained in:
parent
c20b6f5b0e
commit
c4ad3480bd
2 changed files with 9 additions and 9 deletions
|
|
@ -11,9 +11,9 @@ def remove_old_files():
|
||||||
os.remove(file)
|
os.remove(file)
|
||||||
|
|
||||||
def download():
|
def download():
|
||||||
repos = subprocess.Popen(['osc', 'repositories'], stdout=subprocess.PIPE)
|
repos = subprocess.Popen(["osc", "repositories"], stdout=subprocess.PIPE)
|
||||||
for line in repos.stdout:
|
for line in repos.stdout:
|
||||||
command = ['osc', 'buildlog', '--last'] + line.split()
|
command = ["osc", "buildlog", "--last"] + line.split()
|
||||||
filename = "-".join(line.split()) + ".log"
|
filename = "-".join(line.split()) + ".log"
|
||||||
print("Downloading logs using: {}".format(" ".join(command)))
|
print("Downloading logs using: {}".format(" ".join(command)))
|
||||||
buildlog = subprocess.Popen(command, stdout=subprocess.PIPE)
|
buildlog = subprocess.Popen(command, stdout=subprocess.PIPE)
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ def get_cflags(language, std, compiler):
|
||||||
"scilab":"-Werror " + c_common,
|
"scilab":"-Werror " + c_common,
|
||||||
"tcl":"-Werror " + c_common,
|
"tcl":"-Werror " + c_common,
|
||||||
}
|
}
|
||||||
if compiler == 'clang':
|
if compiler == "clang":
|
||||||
cflags["guile"] += " -Wno-attributes" # -Wno-attributes is for clang LLVM 3.5 and bdw-gc < 7.5 used by guile
|
cflags["guile"] += " -Wno-attributes" # -Wno-attributes is for clang LLVM 3.5 and bdw-gc < 7.5 used by guile
|
||||||
|
|
||||||
if language not in cflags:
|
if language not in cflags:
|
||||||
|
|
@ -54,7 +54,7 @@ def get_cxxflags(language, std, compiler):
|
||||||
"scilab":"-Werror " + cxx_common,
|
"scilab":"-Werror " + cxx_common,
|
||||||
"tcl":"-Werror " + cxx_common,
|
"tcl":"-Werror " + cxx_common,
|
||||||
}
|
}
|
||||||
if compiler == 'clang':
|
if compiler == "clang":
|
||||||
cxxflags["guile"] += " -Wno-attributes" # -Wno-attributes is for clang LLVM 3.5 and bdw-gc < 7.5 used by guile
|
cxxflags["guile"] += " -Wno-attributes" # -Wno-attributes is for clang LLVM 3.5 and bdw-gc < 7.5 used by guile
|
||||||
|
|
||||||
if language not in cxxflags:
|
if language not in cxxflags:
|
||||||
|
|
@ -64,12 +64,12 @@ def get_cxxflags(language, std, compiler):
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
parser = argparse.ArgumentParser(description="Display CFLAGS or CXXFLAGS to use for testing the SWIG examples and test-suite.")
|
parser = argparse.ArgumentParser(description="Display CFLAGS or CXXFLAGS to use for testing the SWIG examples and test-suite.")
|
||||||
parser.add_argument('-l', '--language', required=True, help='set language to show flags for')
|
parser.add_argument("-l", "--language", required=True, help="set language to show flags for")
|
||||||
flags = parser.add_mutually_exclusive_group(required=True)
|
flags = parser.add_mutually_exclusive_group(required=True)
|
||||||
flags.add_argument('-c', '--cflags', action='store_true', default=False, help='show CFLAGS')
|
flags.add_argument("-c", "--cflags", action="store_true", default=False, help="show CFLAGS")
|
||||||
flags.add_argument('-x', '--cxxflags', action='store_true', default=False, help='show CXXFLAGS')
|
flags.add_argument("-x", "--cxxflags", action="store_true", default=False, help="show CXXFLAGS")
|
||||||
parser.add_argument('-s', '--std', required=False, help='language standard flags for the -std= option')
|
parser.add_argument("-s", "--std", required=False, help="language standard flags for the -std= option")
|
||||||
parser.add_argument('-C', '--compiler', required=False, help='compiler used (clang or gcc)')
|
parser.add_argument("-C", "--compiler", required=False, help="compiler used (clang or gcc)")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.cflags:
|
if args.cflags:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue