]> git.pld-linux.org Git - packages/brotli.git/blobdiff - brotli-py2.patch
- added py2 patch (restore setup.py compatibility with python2.7), cleanup
[packages/brotli.git] / brotli-py2.patch
diff --git a/brotli-py2.patch b/brotli-py2.patch
new file mode 100644 (file)
index 0000000..a6cc9d9
--- /dev/null
@@ -0,0 +1,20 @@
+--- brotli-1.1.0/setup.py.orig 2023-08-29 13:00:29.000000000 +0200
++++ brotli-1.1.0/setup.py      2023-11-08 19:42:16.251391487 +0100
+@@ -27,7 +27,7 @@ def read_define(path, macro):
+   """ Return macro value from the given file. """
+   with open(path, 'r') as f:
+     for line in f:
+-      m = re.match(rf'#define\s{macro}\s+(.+)', line)
++      m = re.match(r'#define\s{macro}\s+(.+)'.format(macro=macro), line)
+       if m:
+         return m.group(1)
+   return ''
+@@ -41,7 +41,7 @@ def get_version():
+   patch = read_define(version_file_path, 'BROTLI_VERSION_PATCH')
+   if not major or not minor or not patch:
+     return ''
+-  return f'{major}.{minor}.{patch}'
++  return '{major}.{minor}.{patch}'.format(major=major, minor=minor, patch=patch)
+ def get_test_suite():
This page took 0.099721 seconds and 4 git commands to generate.