forked from pool/python-nose2
Compare commits
8 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 50fd75aad9 | |||
| fc266e0302 | |||
| 8e1871b230 | |||
| 3bec5ce076 | |||
| f0333b5272 | |||
| 40fb3ce81a | |||
| ff552b1d78 | |||
| 29f2afe441 |
@@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 4 01:46:07 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Rip out the requirement of the wheel.whl, recent setuptools no longer
|
||||||
|
require it.
|
||||||
|
- Add patch support-python314.patch:
|
||||||
|
* Support Python 3.14 multiprocessing and argparse changes.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 21 10:02:03 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives on SLE-16-based and newer systems only
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 16 13:04:55 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 4 20:42:07 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
Tue Jun 4 20:42:07 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-nose2
|
# spec file for package python-nose2
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,6 +16,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-nose2
|
Name: python-nose2
|
||||||
Version: 0.15.1
|
Version: 0.15.1
|
||||||
@@ -24,8 +29,8 @@ Summary: The successor to the Python testing framework nose, based on uni
|
|||||||
License: BSD-2-Clause AND Python-2.0
|
License: BSD-2-Clause AND Python-2.0
|
||||||
URL: https://github.com/nose-devs/nose2
|
URL: https://github.com/nose-devs/nose2
|
||||||
Source: https://files.pythonhosted.org/packages/source/n/nose2/nose2-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/n/nose2/nose2-%{version}.tar.gz
|
||||||
# Required for testsuite. Bring on python-wheel-wheel
|
# PATCH-FIX-OPENSUSE Support Python 3.14 multiprocessing and argparse changes
|
||||||
Source1: https://files.pythonhosted.org/packages/c7/c3/55076fc728723ef927521abaa1955213d094933dc36d4a2008d5101e1af5/wheel-0.42.0-py3-none-any.whl
|
Patch0: support-python314.patch
|
||||||
BuildRequires: %{python_module coverage}
|
BuildRequires: %{python_module coverage}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools-wheel}
|
BuildRequires: %{python_module setuptools-wheel}
|
||||||
@@ -33,10 +38,15 @@ BuildRequires: %{python_module setuptools}
|
|||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires(post): update-alternatives
|
|
||||||
Requires(postun): update-alternatives
|
|
||||||
Suggests: python-coverage
|
Suggests: python-coverage
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -46,8 +56,6 @@ nose2's purpose is to extend unittest to make testing nicer and easier to unders
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n nose2-%{version}
|
%autosetup -p1 -n nose2-%{version}
|
||||||
mkdir ../wheels
|
|
||||||
cp %{SOURCE1} ../wheels
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
@@ -63,7 +71,7 @@ export LC_CTYPE=C.UTF8
|
|||||||
%{python_expand # nose must test itself in an editable install
|
%{python_expand # nose must test itself in an editable install
|
||||||
$python -m venv editable-%{$python_bin_suffix} --system-site-packages
|
$python -m venv editable-%{$python_bin_suffix} --system-site-packages
|
||||||
. editable-%{$python_bin_suffix}/bin/activate
|
. editable-%{$python_bin_suffix}/bin/activate
|
||||||
pip install --no-index --find-links /usr/lib/python%{$python_bin_suffix}/wheels --find-links ../wheels -e .
|
pip install --no-index --find-links %{_prefix}/lib/python%{$python_bin_suffix}/wheels -e .
|
||||||
nose2 -v --pretty-assert
|
nose2 -v --pretty-assert
|
||||||
deactivate
|
deactivate
|
||||||
}
|
}
|
||||||
@@ -74,6 +82,9 @@ deactivate
|
|||||||
%postun
|
%postun
|
||||||
%python_uninstall_alternative nose2
|
%python_uninstall_alternative nose2
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%python_libalternatives_reset_alternative nose2
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc AUTHORS README.rst
|
%doc AUTHORS README.rst
|
||||||
|
|||||||
43
support-python314.patch
Normal file
43
support-python314.patch
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
Index: nose2-0.15.1/nose2/plugins/mp.py
|
||||||
|
===================================================================
|
||||||
|
--- nose2-0.15.1.orig/nose2/plugins/mp.py
|
||||||
|
+++ nose2-0.15.1/nose2/plugins/mp.py
|
||||||
|
@@ -1,7 +1,9 @@
|
||||||
|
+import contextlib
|
||||||
|
import logging
|
||||||
|
import multiprocessing
|
||||||
|
import multiprocessing.connection as connection
|
||||||
|
import os
|
||||||
|
+import platform
|
||||||
|
import select
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
@@ -28,6 +30,11 @@ class MultiProcess(events.Plugin):
|
||||||
|
|
||||||
|
self.cases = {}
|
||||||
|
|
||||||
|
+ # This requires the broken 'fork' start method to share state.
|
||||||
|
+ if sys.version_info[:2] >= (3, 14) and platform.system() == "Linux":
|
||||||
|
+ with contextlib.suppress(RuntimeError):
|
||||||
|
+ multiprocessing.set_start_method('fork')
|
||||||
|
+
|
||||||
|
@property
|
||||||
|
def procs(self):
|
||||||
|
"""Get the appropriate number of procs for self.procs if self._procs is
|
||||||
|
Index: nose2-0.15.1/nose2/tests/unit/test_plugin_api.py
|
||||||
|
===================================================================
|
||||||
|
--- nose2-0.15.1.orig/nose2/tests/unit/test_plugin_api.py
|
||||||
|
+++ nose2-0.15.1/nose2/tests/unit/test_plugin_api.py
|
||||||
|
@@ -17,9 +17,9 @@ class TestPluginApi(TestCase):
|
||||||
|
|
||||||
|
def test_add_option_adds_option(self):
|
||||||
|
helpt = self.session.argparse.format_help()
|
||||||
|
- assert "-X, --xxx" in helpt, (
|
||||||
|
- "commandLineSwitch arg not found in help text: %s" % helpt
|
||||||
|
- )
|
||||||
|
+ # Output may be colored
|
||||||
|
+ assert "-X" in helpt
|
||||||
|
+ assert "--xxx" in helpt
|
||||||
|
|
||||||
|
def test_short_opt_registers_plugin(self):
|
||||||
|
args, argv = self.session.argparse.parse_known_args(["-X"])
|
||||||
BIN
wheel-0.42.0-py3-none-any.whl
LFS
BIN
wheel-0.42.0-py3-none-any.whl
LFS
Binary file not shown.
Reference in New Issue
Block a user