summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/anki/files/23.12.1/remove-formatter-dep.patch')
-rw-r--r--app-misc/anki/files/23.12.1/remove-formatter-dep.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/app-misc/anki/files/23.12.1/remove-formatter-dep.patch b/app-misc/anki/files/23.12.1/remove-formatter-dep.patch
new file mode 100644
index 000000000000..2d02db3324fc
--- /dev/null
+++ b/app-misc/anki/files/23.12.1/remove-formatter-dep.patch
@@ -0,0 +1,11 @@
+Remove dependency on dev-python/black used to format the generated hooks.py
+file as it's not relevant in a packaging use case.
+
+From: Lucio Sauer <watermanpaint@posteo.net>
+--- a/pylib/tools/hookslib.py
++++ b/pylib/tools/hookslib.py
+@@ -208,4 +208,3 @@ def write_file(path: str, hooks: list[Hook], prefix: str, suffix: str):
+ os.environ["USERPROFILE"] = os.environ["HOME"]
+ with open(path, "wb") as file:
+ file.write(code.encode("utf8"))
+- subprocess.run([sys.executable, "-m", "black", "-q", path], check=True)