14
0

Accepting request 1202928 from home:ecsos:python

- Fix build error under Leap.

OBS-URL: https://build.opensuse.org/request/show/1202928
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyrsistent?expand=0&rev=35
This commit is contained in:
2024-09-24 13:00:32 +00:00
committed by Git OBS Bridge
parent 3164fd84d4
commit 1c7a9fb0f5
2 changed files with 12 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ Group: Development/Languages/Python
URL: http://github.com/tobgu/pyrsistent/
Source: https://files.pythonhosted.org/packages/source/p/pyrsistent/pyrsistent-%{version}.tar.gz
# PATCH-FIX-UPSTREAM - gh/tobgu/pyrsistent#284 - Replace _PyList_Extend with PyList_SetSlice
Patch: https://patch-diff.githubusercontent.com/raw/tobgu/pyrsistent/pull/284.patch#/replace-private-function.patch
Patch1: https://patch-diff.githubusercontent.com/raw/tobgu/pyrsistent/pull/284.patch#/replace-private-function.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module pip}
@@ -49,7 +49,7 @@ is left untouched.
%prep
%setup -q -n pyrsistent-%{version}
%patch -P0 -p1
%patch -P 1 -p1
%build
export CFLAGS="%{optflags}"
@@ -57,6 +57,11 @@ export CFLAGS="%{optflags}"
%install
%pyproject_install
# Fix python-bytecode-inconsistent-mtime
pushd %{buildroot}%{python_sitearch}
find . -name '*.pyc' -exec rm -f '{}' ';'
python%python_bin_suffix -m compileall *.py ';'
popd
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check