]> git.pld-linux.org Git - packages/brotli.git/commitdiff
- added py2 patch (restore setup.py compatibility with python2.7), cleanup auto/th/brotli-1.1.0-1
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 8 Nov 2023 18:57:58 +0000 (19:57 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Wed, 8 Nov 2023 18:57:58 +0000 (19:57 +0100)
brotli-py2.patch [new file with mode: 0644]
brotli.spec

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():
index 1d1d57348fed0353f0ee8fabc74a917014ae7b6b..11e8ea7269f3d902765f0380996cb89db5a011b8 100644 (file)
@@ -1,8 +1,8 @@
 #
 # Conditional build:
-%bcond_with    python2         # Python 2 module
+%bcond_without python2         # Python 2 module
 %bcond_without python3         # Python 3 module
-%bcond_without static_libs     # don't build static libraries
+%bcond_without static_libs     # static libraries
 #
 Summary:       Brotli - generic-purpose lossless compression algorithm
 Summary(pl.UTF-8):     Brotli - algorytm bezstratnej kompresji ogólnego przeznaczenia
@@ -14,16 +14,13 @@ Group:              Libraries
 #Source0Download: https://github.com/google/brotli/releases
 Source0:       https://github.com/google/brotli/archive/v%{version}/Brotli-%{version}.tar.gz
 # Source0-md5: 3a6a3dba82a3604792d3cb0bd41bca60
-Patch0:                %{name}-pc.patch
+Patch0:                %{name}-py2.patch
 URL:           https://github.com/google/brotli/
-BuildRequires: autoconf >= 2.61
-BuildRequires: automake >= 1:1.7
 BuildRequires: bc
 BuildRequires: cmake >= 3.16
 BuildRequires: libstdc++-devel >= 6:4.7
-BuildRequires: libtool >= 2:2
-%{?with_python2:BuildRequires: python-devel >= 2}
-%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
+%{?with_python2:BuildRequires: python-devel >= 1:2.7}
+%{?with_python3:BuildRequires: python3-devel >= 1:3.3}
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
 Requires:      libbrotli = %{version}-%{release}
@@ -113,9 +110,11 @@ Moduł Pythona 3 do kodowania/dekodowania kompresji Brotli.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %cmake -B build
+
 %{__make} -C build
 
 %if %{with static_libs}
@@ -128,6 +127,7 @@ Moduł Pythona 3 do kodowania/dekodowania kompresji Brotli.
 %if %{with python2}
 %py_build
 %endif
+
 %if %{with python3}
 %py3_build
 %endif
This page took 0.051936 seconds and 4 git commands to generate.