2017-02-07 08:53:40 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-nose2
|
|
|
|
#
|
2025-07-16 13:06:39 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2017-02-07 08:53:40 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-04-08 11:22:28 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-04-24 14:57:26 +00:00
|
|
|
#
|
2017-02-07 08:53:40 +00:00
|
|
|
|
|
|
|
|
2025-07-16 13:06:39 +00:00
|
|
|
%bcond_without libalternatives
|
2023-04-21 14:20:28 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2017-02-07 08:53:40 +00:00
|
|
|
Name: python-nose2
|
2024-06-04 20:44:07 +00:00
|
|
|
Version: 0.15.1
|
2017-02-07 08:53:40 +00:00
|
|
|
Release: 0
|
2022-08-20 21:28:15 +00:00
|
|
|
Summary: The successor to the Python testing framework nose, based on unittest
|
2018-08-13 12:18:01 +00:00
|
|
|
License: BSD-2-Clause AND Python-2.0
|
|
|
|
URL: https://github.com/nose-devs/nose2
|
2017-02-07 08:53:40 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/n/nose2/nose2-%{version}.tar.gz
|
2024-01-08 05:40:45 +00:00
|
|
|
# Required for testsuite. Bring on python-wheel-wheel
|
2025-07-16 13:06:39 +00:00
|
|
|
Source1: https://files.pythonhosted.org/packages/c7/w/wheel/wheel-0.42.0-py3-none-any.whl
|
2022-08-20 21:28:15 +00:00
|
|
|
BuildRequires: %{python_module coverage}
|
|
|
|
BuildRequires: %{python_module pip}
|
2024-01-08 05:40:45 +00:00
|
|
|
BuildRequires: %{python_module setuptools-wheel}
|
2017-04-24 14:57:26 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2022-08-20 21:28:15 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2025-07-16 13:06:39 +00:00
|
|
|
BuildRequires: alts
|
2018-08-13 12:18:01 +00:00
|
|
|
BuildRequires: fdupes
|
2017-04-24 14:57:26 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2025-07-16 13:06:39 +00:00
|
|
|
Requires: alts
|
2022-08-20 21:28:15 +00:00
|
|
|
Suggests: python-coverage
|
2017-02-07 08:53:40 +00:00
|
|
|
BuildArch: noarch
|
2017-04-24 14:57:26 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
2017-02-07 08:53:40 +00:00
|
|
|
%description
|
2022-08-20 21:28:15 +00:00
|
|
|
nose2 is the successor to nose. It's unittest with plugins.
|
|
|
|
nose2 is a new project and does not support all of the behaviors of nose.
|
|
|
|
nose2's purpose is to extend unittest to make testing nicer and easier to understand.
|
2017-02-07 08:53:40 +00:00
|
|
|
|
|
|
|
%prep
|
2024-01-08 05:40:45 +00:00
|
|
|
%autosetup -p1 -n nose2-%{version}
|
|
|
|
mkdir ../wheels
|
|
|
|
cp %{SOURCE1} ../wheels
|
2017-02-07 08:53:40 +00:00
|
|
|
|
|
|
|
%build
|
2022-08-20 21:28:15 +00:00
|
|
|
%pyproject_wheel
|
2017-02-07 08:53:40 +00:00
|
|
|
|
|
|
|
%install
|
2022-08-20 21:28:15 +00:00
|
|
|
# -I : work around boo#1201041
|
|
|
|
%pyproject_install -I
|
2017-04-24 14:57:26 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/nose2
|
2022-08-20 21:28:15 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2017-02-07 08:53:40 +00:00
|
|
|
|
|
|
|
%check
|
2019-05-14 17:13:21 +00:00
|
|
|
export LC_CTYPE=C.UTF8
|
2022-08-20 21:28:15 +00:00
|
|
|
%{python_expand # nose must test itself in an editable install
|
|
|
|
$python -m venv editable-%{$python_bin_suffix} --system-site-packages
|
|
|
|
. editable-%{$python_bin_suffix}/bin/activate
|
2025-07-16 13:06:39 +00:00
|
|
|
pip install --no-index --find-links %{_prefix}/lib/python%{$python_bin_suffix}/wheels --find-links ../wheels -e .
|
2022-08-20 21:28:15 +00:00
|
|
|
nose2 -v --pretty-assert
|
|
|
|
deactivate
|
|
|
|
}
|
2017-02-07 08:53:40 +00:00
|
|
|
|
2025-07-16 13:06:39 +00:00
|
|
|
%pre
|
|
|
|
%python_libalternatives_reset_alternative nose2
|
2017-02-07 08:53:40 +00:00
|
|
|
|
2017-04-24 14:57:26 +00:00
|
|
|
%files %{python_files}
|
2024-01-08 05:40:45 +00:00
|
|
|
%license LICENSE
|
2018-08-13 12:18:01 +00:00
|
|
|
%doc AUTHORS README.rst
|
2017-04-24 14:57:26 +00:00
|
|
|
%python_alternative %{_bindir}/nose2
|
2022-08-20 21:28:15 +00:00
|
|
|
%{python_sitelib}/nose2
|
2024-01-08 05:40:45 +00:00
|
|
|
%{python_sitelib}/nose2-%{version}.dist-info
|
2017-02-07 08:53:40 +00:00
|
|
|
|
|
|
|
%changelog
|