## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # # We can generate PDF documentation as a substitute. %bcond doc 1 Name: python-nose2 Version: 0.14.0 Release: %autorelease Summary: The successor to nose, based on unittest2 # The entire source is BSD-2-Clause, except that unspecified portions are # derived from unittest2 under a BSD-3-Clause. See LICENSE. License: BSD-2-Clause AND BSD-3-Clause URL: https://nose2.io/ %global forgeurl https://github.com/nose-devs/nose2 Source0: %{forgeurl}/archive/%{version}/nose2-%{version}.tar.gz # Man page written for Fedora in groff_man(7) format based on --help output Source1: nose2.1 # Keep the tox config from pulling in the dev extra. This makes sense upstream # (so the patch is not offered there), but for us it brings in unwanted # dependencies like coverage and linter tools, the Sphinx HTML theme and the # sphinx-issues package used for upstream changelog management, and the # deprecated PyPI “mock” package (which is not actually needed for the tests on # modern Python versions). Patch: nose2-0.11.0-tox-no-dev-extra.patch # Downstream-only: skip test_skip_reason_in_message on Python 3.13+ # This is a workaround while we wait for an upstream fix. # # Python 3.13: test_skip_reason_in_message fails # https://github.com/nose-devs/nose2/issues/588 # # https://bugzilla.redhat.com/show_bug.cgi?id=2246281 Patch: 0001-Downstream-only-skip-test_skip_reason_in_message-on-.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: hardlink %if %{with doc} BuildRequires: make BuildRequires: python3-sphinx-latex BuildRequires: latexmk # This is in the “dev” extra as defined in setup.py, but we do not use it to # generate BuildRequires because we would have to patch out unwanted # dependencies like mock, coverage, and the HTML theme. BuildRequires: python3dist(sphinx) # Note that sphinx-issues is used upstream for changelog management but is not # required at build time. %endif %global common_description %{expand: nose2 is the successor to nose. It’s unittest with plugins. nose2’s purpose is to extend unittest to make testing nicer and easier to understand.} %description %{common_description} %package -n python3-nose2 Summary: Next generation of nicer testing for Python %description -n python3-nose2 %{common_description} %if %{with doc} %package doc Summary: Documentation for %{name} %description doc %{common_description} %endif %pyproject_extras_subpkg -n python3-nose2 coverage_plugin %prep %autosetup -n nose2-%{version} -p1 # Patch out unnecessary documentation dependency on sphinx-issues, used # upstream for changelog generation. sed -r -i '/"sphinx_issues",/d' docs/conf.py # Workaround for https://github.com/rpm-software-management/rpm/issues/2532: rm -rf SPECPARTS # Remove shebangs from non-script sources. The find-then-modify pattern # preserves mtimes on sources that did not need to be modified. find nose2/ -type f -name '*.py' \ -exec gawk '/^#!/ { print FILENAME }; { nextfile }' '{}' '+' | xargs -r -t sed -r -i '1{/^#!/d}' %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel %if %{with doc} PYTHONPATH="${PWD}" %make_build -C docs latex \ SPHINXOPTS='-j%{?_smp_build_ncpus}' %make_build -C docs/_build/latex LATEXMKOPTS='-quiet' %endif %install %pyproject_install %pyproject_save_files nose2 hardlink -v '%{buildroot}%{_bindir}' install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE1}' %check %tox -e %{toxenv}-nocov %files -n python3-nose2 -f %{pyproject_files} %doc AUTHORS %if %{without doc} %doc README.rst docs/changelog.rst %endif %{_bindir}/nose2 %{_mandir}/man1/nose2.1* %if %{with doc} %files doc %license LICENSE %doc AUTHORS README.rst docs/changelog.rst %doc docs/_build/latex/nose2.pdf %endif %changelog * Thu Oct 26 2023 Benjamin A. Beasley - 0.14.0-3 - Skip test_skip_reason_in_message on Python 3.13+ (close RHBZ#2246281) * Thu Oct 05 2023 Benjamin A. Beasley - 0.14.0-2 - Revert "Temporarily skip tests failing with Python 3.12.0b2" * Thu Oct 05 2023 Benjamin A. Beasley - 0.14.0-1 - Update to 0.14.0 (close RHBZ#2242286) * Fri Jul 21 2023 Fedora Release Engineering - 0.13.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jul 11 2023 Benjamin A. Beasley - 0.13.0-7 - Remove shebangs from non-script sources * Tue Jul 11 2023 Benjamin A. Beasley - 0.13.0-6 - When PDF docs are disabled, omit the -doc subpackage - Do not package contributing.rst, which is about interacting with the upstream project. * Fri Jul 07 2023 Benjamin A. Beasley - 0.13.0-5 - Use new (rpm 4.17.1+) bcond style * Mon Jun 19 2023 Tomáš Hrnčiar - 0.13.0-4 - Temporarily skip tests failing with Python 3.12.0b2 * Sat Jun 17 2023 Miro Hrončok - 0.13.0-3 - Workaround SPECPARTS dir leaking to setuptools package discovery * Wed Jun 14 2023 Python Maint - 0.13.0-2 - Rebuilt for Python 3.12 * Sun Apr 30 2023 Benjamin A. Beasley - 0.13.0-1 - Update to 0.13.0 (close RHBZ#2192205) * Fri Mar 17 2023 Benjamin A. Beasley - 0.12.0-4 - Don’t assume %%_smp_mflags is -j%%_smp_build_ncpus * Fri Jan 20 2023 Fedora Release Engineering - 0.12.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Nov 24 2022 Benjamin A. Beasley - 0.12.0-2 - Update License to SPDX * Sat Jul 23 2022 Benjamin A. Beasley - 0.12.0-1 - Update to 0.12.0 (close RHBZ#2107926) - The nose2-%%%%{python3_version} command, e.g. nose2-3.11, is removed. - De-vendor six, which upstream has vendored. * Fri Jul 22 2022 Fedora Release Engineering - 0.11.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Jul 07 2022 Benjamin A. Beasley - 0.11.0-10 - Fix extra newline in description * Mon Jun 13 2022 Python Maint - 0.11.0-9 - Rebuilt for Python 3.11 * Wed Jun 08 2022 Benjamin A. Beasley - 0.11.0-8 - Small typo fix in the man page * Mon Jun 06 2022 Benjamin A. Beasley - 0.11.0-7 - A few dependency fixes - Drop versioning on sphinx dependency (matching backported commit fb770f4) - Drop spurious sphinx-issues BR - Stop generating unwanted BR’s from the “dev” extra via tox * Sun Jun 05 2022 Benjamin A. Beasley - 0.11.0-6 - Add a man page * Sun Jun 05 2022 Benjamin A. Beasley - 0.11.0-5 - Build Sphinx documentation as a PDF - Package from the GitHub archive instead of the PyPI sdist - Add a -doc subpackage - Use tox for running tests * Sun Jun 05 2022 Benjamin A. Beasley - 0.11.0-4 - Port to pyproject-rpm-macros - Add metapackage for coverage_plugin extra - Update upstream URL - Hardlink identical entry point scripts * Mon May 16 2022 Tomáš Hrnčiar - 0.11.0-1 - Update to 0.11.0 * Fri Jan 21 2022 Fedora Release Engineering - 0.9.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 0.9.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed Jun 02 2021 Python Maint - 0.9.1-6 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.9.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 0.9.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Fri May 22 2020 Miro Hrončok - 0.9.1-3 - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 0.9.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Tue Oct 01 2019 Aurelien Bompard - 0.9.1-1 - Version 0.9.1 * Sat Aug 17 2019 Miro Hrončok - 0.7.4-6 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 0.7.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 02 2019 Fedora Release Engineering - 0.7.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sun Oct 21 2018 Miro Hrončok - 0.7.4-3 - Drop python2 subpackage https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal * Sat Jul 14 2018 Fedora Release Engineering - 0.7.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Jun 29 2018 Miro Hrončok - 0.7.4-1 - Update to 0.7.4 (#1509750), fixes FTBFS (#1556222) * Tue Jun 19 2018 Miro Hrončok - 0.6.5-8 - Rebuilt for Python 3.7 * Mon Mar 26 2018 Iryna Shcherbina - 0.6.5-7 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Fri Feb 09 2018 Fedora Release Engineering - 0.6.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 0.6.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Jun 10 2017 Aurelien Bompard - 0.6.5-4 - Rename a BuildRequires * Sat Feb 11 2017 Fedora Release Engineering - 0.6.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 0.6.5-2 - Rebuild for Python 3.6 * Tue Sep 13 2016 Aurelien Bompard - 0.6.5-1 - Initial package.