Debian Codegraph @

debian/patches/Load-ninja_syntax-from-gftools.patch

raw
1 From: Bastian Germann <[email protected]>
2 Date: Wed, 2 Apr 2025 08:37:11 +0200
3 Subject: Load ninja_syntax from gftools
4
5 The origin can be the ninja-build package when https://bugs.debian.org/943540
6 is implemented.
7
8 Forwarded: not-needed
9 ---
10 Lib/gftools/builder/__init__.py | 5 ++---
11 Lib/gftools/builder/operations/instantiateUfo.py | 2 +-
12 pyproject.toml | 1 -
13 3 files changed, 3 insertions(+), 5 deletions(-)
14
15 diff --git a/Lib/gftools/builder/__init__.py b/Lib/gftools/builder/__init__.py
16 index 28f9f3f..c458f2e 100644
17 --- a/Lib/gftools/builder/__init__.py
18 +++ b/Lib/gftools/builder/__init__.py
19 @@ -14,8 +14,7 @@ import networkx as nx
20 import strictyaml
21 import yaml
22 from fontmake.font_project import FontProject
23 -from ninja import _program
24 -from ninja.ninja_syntax import Writer, escape_path
25 +from gftools.builder.ninja_syntax import Writer, escape_path
26 from typing import Union
27
28 from gftools.builder.file import File
29 @@ -455,4 +454,4 @@ def main(args=None):
30 pd.draw_graph()
31 if not args.no_ninja:
32 atexit.register(pd.clean)
33 - raise SystemExit(_program("ninja", ["-f", pd.ninja_file_name]))
34 + raise SystemExit(subprocess.call(["ninja", "-f", pd.ninja_file_name], close_fds=False))
35 diff --git a/Lib/gftools/builder/operations/instantiateUfo.py b/Lib/gftools/builder/operations/instantiateUfo.py
36 index cc16017..9dddabc 100644
37 --- a/Lib/gftools/builder/operations/instantiateUfo.py
38 +++ b/Lib/gftools/builder/operations/instantiateUfo.py
39 @@ -7,7 +7,7 @@ import os
40 import gftools.builder
41 from functools import cached_property
42 from glyphsLib.builder import UFOBuilder
43 -from ninja.ninja_syntax import Writer, escape_path, escape
44 +from gftools.builder.ninja_syntax import Writer, escape_path, escape
45 from fontTools.designspaceLib import InstanceDescriptor
46
47
48 diff --git a/pyproject.toml b/pyproject.toml
49 index c05661f..bb12431 100644
50 --- a/pyproject.toml
51 +++ b/pyproject.toml
52 @@ -65,7 +65,6 @@ dependencies = [
53 'beautifulsoup4',
54 'rich',
55 'packaging',
56 - 'ninja',
57 'networkx',
58 'ruamel.yaml',
59 'ffmpeg-python',