Accepting request 1108061 from devel:languages:python
Forwarded request #1107904 from mcalabkova - Add patch loop.patch to fix the test failure OBS-URL: https://build.opensuse.org/request/show/1108061 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyuv?expand=0&rev=7
This commit is contained in:
16
loop.patch
Normal file
16
loop.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
Index: pyuv-1.4.0/tests/test_loop.py
|
||||
===================================================================
|
||||
--- pyuv-1.4.0.orig/tests/test_loop.py
|
||||
+++ pyuv-1.4.0/tests/test_loop.py
|
||||
@@ -48,9 +48,9 @@ class LoopRunTest(TestCase):
|
||||
prepare.start(prepare_cb)
|
||||
self.loop.run(pyuv.UV_RUN_DEFAULT)
|
||||
self.assertEqual(self.timer_called, 1)
|
||||
- self.assertTrue(self.prepare_called >= 2)
|
||||
+ self.assertEqual(self.prepare_called, 1)
|
||||
self.loop.run(pyuv.UV_RUN_NOWAIT)
|
||||
- self.assertTrue(self.prepare_called >= 3)
|
||||
+ self.assertEqual(self.prepare_called, 2)
|
||||
self.loop.run(pyuv.UV_RUN_DEFAULT)
|
||||
self.assertEqual(self.timer_called, 10)
|
||||
self.assertEqual(self.prepare_called, 10)
|
||||
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 29 10:00:10 UTC 2023 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add patch loop.patch to fix the test failure
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 19 17:01:07 UTC 2023 - Scott Bradnick <scott.bradnick@suse.com>
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ Source: https://files.pythonhosted.org/packages/source/p/pyuv/pyuv-%{ver
|
||||
Patch0: tests_async_keyword.patch
|
||||
Patch1: tests_py3.patch
|
||||
Patch2: fix_building_for_Python311.patch
|
||||
# PATCH-FIX-OPENSUSE mmachova@suse.com https://github.com/saghul/pyuv/issues/279
|
||||
Patch3: loop.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
@@ -41,10 +43,7 @@ BuildRequires: pkgconfig(libuv)
|
||||
Python interface for libuv.
|
||||
|
||||
%prep
|
||||
%setup -q -n pyuv-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%autosetup -p1 -n pyuv-%{version}
|
||||
# Force system libuv
|
||||
rm -r deps/libuv
|
||||
rmdir deps
|
||||
@@ -56,17 +55,8 @@ sed -i 's:"proc_:"tests/proc_:' tests/test_process.py
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
%{python_expand \
|
||||
# fix for py3.10, but it doesn't work for py3.8 and lower
|
||||
# https://github.com/saghul/pyuv/issues/271
|
||||
%if %{$python_version_nodots} > 38
|
||||
sed -i 's/Py_REFCNT(self) = refcnt/Py_SET_REFCNT(self, refcnt)/' src/handle.c
|
||||
%else
|
||||
# what if python3.8 isn't first in the line?
|
||||
sed -i 's/Py_SET_REFCNT(self, refcnt)/Py_REFCNT(self) = refcnt/' src/handle.c
|
||||
%endif
|
||||
$python setup.py build
|
||||
}
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
|
||||
Reference in New Issue
Block a user