From 1c7a9fb0f54092705dbc697669d8e98fddfba45ba2475f6782d9e5087a83f239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 24 Sep 2024 13:00:32 +0000 Subject: [PATCH] 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 --- python-pyrsistent.changes | 5 +++++ python-pyrsistent.spec | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/python-pyrsistent.changes b/python-pyrsistent.changes index cb3e2c3..40d7555 100644 --- a/python-pyrsistent.changes +++ b/python-pyrsistent.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 24 11:32:02 UTC 2024 - ecsos + +- Fix build error under Leap. + ------------------------------------------------------------------- Tue Jul 30 13:00:09 UTC 2024 - John Paul Adrian Glaubitz diff --git a/python-pyrsistent.spec b/python-pyrsistent.spec index da57c5c..80539a1 100644 --- a/python-pyrsistent.spec +++ b/python-pyrsistent.spec @@ -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