Accepting request 800979 from home:ithod:updated
- Fix inkscape-split-extensions-extra.py for older python versions. OBS-URL: https://build.opensuse.org/request/show/800979 OBS-URL: https://build.opensuse.org/package/show/graphics/inkscape?expand=0&rev=62
This commit is contained in:
parent
d4e95d2f28
commit
a82e78304d
@ -11,7 +11,7 @@ def make_deplist(inx_list, module_list):
|
||||
inx_regex = re.compile(rf">(.+)\.py</(dependency|command)>")
|
||||
|
||||
for entry in inx_list:
|
||||
with open(os.path.join(".", entry)) as file:
|
||||
with open(os.path.join(".", entry), encoding="utf-8") as file:
|
||||
for line in file:
|
||||
match = inx_regex.search(line)
|
||||
if (match and match.group(1)
|
||||
@ -21,7 +21,7 @@ def make_deplist(inx_list, module_list):
|
||||
for module in module_list.union(modules):
|
||||
name = os.path.join(".", f"{module}.py")
|
||||
if os.path.isfile(name):
|
||||
with open(name) as file:
|
||||
with open(name, encoding="utf-8") as file:
|
||||
for line in file:
|
||||
match = re.match(r"from (.+) import", line)
|
||||
if not match:
|
||||
@ -53,7 +53,7 @@ if __name__ == "__main__":
|
||||
|
||||
# Search all .py files importing one of the mentioned modules.
|
||||
for entry in pathlib.Path(".").glob("**/*.py"):
|
||||
with entry.open() as file:
|
||||
with entry.open(encoding="utf-8") as file:
|
||||
for line in file:
|
||||
if import_regex.search(line):
|
||||
name = str(entry.as_posix())
|
||||
@ -79,7 +79,7 @@ if __name__ == "__main__":
|
||||
|
||||
for entry in pathlib.Path(".").iterdir():
|
||||
if entry.is_file() and entry.suffix == ".inx":
|
||||
with entry.open() as file:
|
||||
with entry.open(encoding="utf-8") as file:
|
||||
for line in file:
|
||||
if inx_regex.search(line):
|
||||
extra_inx.add(entry.name)
|
||||
@ -103,17 +103,17 @@ if __name__ == "__main__":
|
||||
std_list = work_dir / "inkscape.lst"
|
||||
extra_list = work_dir / "inkscape-extensions-extra.lst"
|
||||
|
||||
with std_list.open("w") as file:
|
||||
with std_list.open("w", encoding="utf-8") as file:
|
||||
for inx in std_inx:
|
||||
if not exclusion_regex.match(inx):
|
||||
print(f"{prefix}{inx}", file=file)
|
||||
with extra_list.open("w") as file:
|
||||
with extra_list.open("w", encoding="utf-8") as file:
|
||||
for inx in extra_inx:
|
||||
if not exclusion_regex.match(inx):
|
||||
print(f"{prefix}{inx}", file=file)
|
||||
|
||||
|
||||
with std_list.open("a") as std_file, extra_list.open("a") as extra_file:
|
||||
with std_list.open("a", encoding="utf-8") as std_file, extra_list.open("a", encoding="utf-8") as extra_file:
|
||||
for entry in pathlib.Path(".").iterdir():
|
||||
if entry.is_file() and entry.suffix == ".py":
|
||||
name = str(entry.as_posix())
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 7 08:30:50 UTC 2020 - thod_@gmx.de
|
||||
|
||||
- Fix inkscape-split-extensions-extra.py for older python versions.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 4 15:29:43 UTC 2020 - Alexei Sorokin <sor.alexei@meowr.ru>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user