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:
parent
41c097ed6c
commit
bc83c07727
@ -26,14 +26,14 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
assert(len(sys.argv) == 4)
|
assert (len(sys.argv) == 4)
|
||||||
|
|
||||||
orc_file = sys.argv[1]
|
orc_file = sys.argv[1]
|
||||||
gen_header = sys.argv[2]
|
gen_header = sys.argv[2]
|
||||||
gen_source = sys.argv[3]
|
gen_source = sys.argv[3]
|
||||||
|
|
||||||
# split off .orc suffix
|
# split off .orc suffix
|
||||||
assert(orc_file.endswith('.orc'))
|
assert (orc_file.endswith('.orc'))
|
||||||
orc_src_base = sys.argv[1][:-4]
|
orc_src_base = sys.argv[1][:-4]
|
||||||
|
|
||||||
# figure out names of disted backup files
|
# 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_header, dist_h)
|
||||||
shutil.copyfile(gen_source, dist_c)
|
shutil.copyfile(gen_source, dist_c)
|
||||||
|
|
||||||
# run gst-indent on the .c files (twice, because gnu indent)
|
# run gst-indent on the .c files
|
||||||
subprocess.run(['gst-indent', dist_c])
|
subprocess.run(['gst-indent-1.0', dist_c])
|
||||||
subprocess.run(['gst-indent', dist_c])
|
|
||||||
|
@ -26,14 +26,14 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
assert(len(sys.argv) == 4)
|
assert (len(sys.argv) == 4)
|
||||||
|
|
||||||
orc_file = sys.argv[1]
|
orc_file = sys.argv[1]
|
||||||
gen_header = sys.argv[2]
|
gen_header = sys.argv[2]
|
||||||
gen_source = sys.argv[3]
|
gen_source = sys.argv[3]
|
||||||
|
|
||||||
# split off .orc suffix
|
# split off .orc suffix
|
||||||
assert(orc_file.endswith('.orc'))
|
assert (orc_file.endswith('.orc'))
|
||||||
orc_src_base = sys.argv[1][:-4]
|
orc_src_base = sys.argv[1][:-4]
|
||||||
|
|
||||||
# figure out names of disted backup files
|
# 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_header, dist_h)
|
||||||
shutil.copyfile(gen_source, dist_c)
|
shutil.copyfile(gen_source, dist_c)
|
||||||
|
|
||||||
# run gst-indent on the .c files (twice, because gnu indent)
|
# run gst-indent on the .c files
|
||||||
subprocess.run(['gst-indent', dist_c])
|
subprocess.run(['gst-indent-1.0', dist_c])
|
||||||
subprocess.run(['gst-indent', dist_c])
|
|
||||||
|
@ -26,14 +26,14 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
assert(len(sys.argv) == 4)
|
assert (len(sys.argv) == 4)
|
||||||
|
|
||||||
orc_file = sys.argv[1]
|
orc_file = sys.argv[1]
|
||||||
gen_header = sys.argv[2]
|
gen_header = sys.argv[2]
|
||||||
gen_source = sys.argv[3]
|
gen_source = sys.argv[3]
|
||||||
|
|
||||||
# split off .orc suffix
|
# split off .orc suffix
|
||||||
assert(orc_file.endswith('.orc'))
|
assert (orc_file.endswith('.orc'))
|
||||||
orc_src_base = sys.argv[1][:-4]
|
orc_src_base = sys.argv[1][:-4]
|
||||||
|
|
||||||
# figure out names of disted backup files
|
# 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_header, dist_h)
|
||||||
shutil.copyfile(gen_source, dist_c)
|
shutil.copyfile(gen_source, dist_c)
|
||||||
|
|
||||||
# run gst-indent on the .c files (twice, because gnu indent)
|
# run gst-indent on the .c files
|
||||||
subprocess.run(['gst-indent', dist_c])
|
subprocess.run(['gst-indent-1.0', dist_c])
|
||||||
subprocess.run(['gst-indent', dist_c])
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user