scripts: update update-orc-dist-files.py scripts for new gst-indent

And fix python indentation with autopep8

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5192>
This commit is contained in:
Tim-Philipp Müller 2023-09-29 18:10:09 +02:00 committed by L. E. Segovia
parent 41c097ed6c
commit bc83c07727
3 changed files with 12 additions and 15 deletions

View file

@ -26,14 +26,14 @@ import shutil
import subprocess
import sys
assert(len(sys.argv) == 4)
assert (len(sys.argv) == 4)
orc_file = sys.argv[1]
gen_header = sys.argv[2]
gen_source = sys.argv[3]
# split off .orc suffix
assert(orc_file.endswith('.orc'))
assert (orc_file.endswith('.orc'))
orc_src_base = sys.argv[1][:-4]
# figure out names of disted backup files
@ -44,6 +44,5 @@ dist_c = orc_src_base + "-dist.c"
shutil.copyfile(gen_header, dist_h)
shutil.copyfile(gen_source, dist_c)
# run gst-indent on the .c files (twice, because gnu indent)
subprocess.run(['gst-indent', dist_c])
subprocess.run(['gst-indent', dist_c])
# run gst-indent on the .c files
subprocess.run(['gst-indent-1.0', dist_c])

View file

@ -26,14 +26,14 @@ import shutil
import subprocess
import sys
assert(len(sys.argv) == 4)
assert (len(sys.argv) == 4)
orc_file = sys.argv[1]
gen_header = sys.argv[2]
gen_source = sys.argv[3]
# split off .orc suffix
assert(orc_file.endswith('.orc'))
assert (orc_file.endswith('.orc'))
orc_src_base = sys.argv[1][:-4]
# figure out names of disted backup files
@ -44,6 +44,5 @@ dist_c = orc_src_base + "-dist.c"
shutil.copyfile(gen_header, dist_h)
shutil.copyfile(gen_source, dist_c)
# run gst-indent on the .c files (twice, because gnu indent)
subprocess.run(['gst-indent', dist_c])
subprocess.run(['gst-indent', dist_c])
# run gst-indent on the .c files
subprocess.run(['gst-indent-1.0', dist_c])

View file

@ -26,14 +26,14 @@ import shutil
import subprocess
import sys
assert(len(sys.argv) == 4)
assert (len(sys.argv) == 4)
orc_file = sys.argv[1]
gen_header = sys.argv[2]
gen_source = sys.argv[3]
# split off .orc suffix
assert(orc_file.endswith('.orc'))
assert (orc_file.endswith('.orc'))
orc_src_base = sys.argv[1][:-4]
# figure out names of disted backup files
@ -44,6 +44,5 @@ dist_c = orc_src_base + "-dist.c"
shutil.copyfile(gen_header, dist_h)
shutil.copyfile(gen_source, dist_c)
# run gst-indent on the .c files (twice, because gnu indent)
subprocess.run(['gst-indent', dist_c])
subprocess.run(['gst-indent', dist_c])
# run gst-indent on the .c files
subprocess.run(['gst-indent-1.0', dist_c])