You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
python-nose2/SPECS/python-nose2.spec

353 lines
12 KiB

## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 5;
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.15.1
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
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: tomcli
%if %{with doc}
BuildRequires: make
BuildRequires: python3-sphinx-latex
BuildRequires: latexmk
%endif
%global common_description %{expand:
nose2 is the successor to nose.
Its unittest with plugins.
nose2s 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
tomcli set pyproject.toml lists delitem project.optional-dependencies.dev \
'sphinx-issues*'
# Since we are not building HTML documentation, we do not need the HTML theme
# either.
tomcli set pyproject.toml lists delitem project.optional-dependencies.dev \
'sphinx-rtd-theme*'
%if %{without doc}
tomcli set pyproject.toml lists delitem project.optional-dependencies.dev \
'sphinx*'
%endif
# 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 -e %{toxenv}-nocov
%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 -l nose2
# Dont install the tests; we are not sure how to fix this *successfully* in
# pyproject.toml, even after reading
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#setuptools-specific-configuration,
# so we havent suggested any change upstream. Still, the tests are large and
# unlikely to be useful to package users.
rm -rvf '%{buildroot}%{python3_sitelib}/nose2/tests/'
sed -r -i '/\/nose2\/tests(\/|$)/d' %{pyproject_files}
install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE1}'
%check
%tox -e %{default_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
* Wed Jan 01 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.15.1-5
- Rebuilt for MSVSphere 10
## START: Generated by rpmautospec
* Fri Oct 11 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.15.1-5
- Revert "Disable the coverage_plugin extra in EPEL10 due to missing dep."
* Sun Aug 25 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.15.1-4
- Disable the coverage_plugin extra in EPEL10 due to missing dep.
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.15.1-2
- Rebuilt for Python 3.13
* Sat Jun 01 2024 Packit <hello@packit.dev> - 0.15.1-1
- Update to 0.15.1 upstream release
- Resolves: rhbz#2284197
* Fri May 31 2024 Packit <hello@packit.dev> - 0.15.0-1
- Update to 0.15.0 upstream release
- Resolves: rhbz#2284063
* Thu May 09 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.2-1
- Update to 0.14.2
* Thu May 09 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.1-4
- Patch for Python 3.13 (close RHBZ#2259545)
* Mon Jan 29 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.1-2
- Stop installing the tests
* Mon Jan 29 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.1-1
- Update to 0.14.1 (close RHBZ#2260807)
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Dec 22 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.0-6
- Fix test reporter output in Python 3.12.1 and later
* Mon Dec 18 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.0-5
- Assert that %%pyproject_files contains a license file
* Mon Dec 18 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.0-4
- Skip test_skip_reason_in_message on Python 3.12.1 and later
* Thu Oct 26 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.0-3
- Skip test_skip_reason_in_message on Python 3.13+ (close RHBZ#2246281)
* Thu Oct 05 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.0-2
- Revert "Temporarily skip tests failing with Python 3.12.0b2"
* Thu Oct 05 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.0-1
- Update to 0.14.0 (close RHBZ#2242286)
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 11 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.13.0-7
- Remove shebangs from non-script sources
* Tue Jul 11 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 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 <code@musicinmybrain.net> - 0.13.0-5
- Use new (rpm 4.17.1+) bcond style
* Mon Jun 19 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 0.13.0-4
- Temporarily skip tests failing with Python 3.12.0b2
* Sat Jun 17 2023 Miro Hrončok <miro@hroncok.cz> - 0.13.0-3
- Workaround SPECPARTS dir leaking to setuptools package discovery
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 0.13.0-2
- Rebuilt for Python 3.12
* Sun Apr 30 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.13.0-1
- Update to 0.13.0 (close RHBZ#2192205)
* Fri Mar 17 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.12.0-4
- Dont assume %%_smp_mflags is -j%%_smp_build_ncpus
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Nov 24 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.12.0-2
- Update License to SPDX
* Sat Jul 23 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 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 <releng@fedoraproject.org> - 0.11.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jul 07 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.11.0-10
- Fix extra newline in description
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.11.0-9
- Rebuilt for Python 3.11
* Wed Jun 08 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.11.0-8
- Small typo fix in the man page
* Mon Jun 06 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 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 BRs from the “dev” extra via tox
* Sun Jun 05 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.11.0-6
- Add a man page
* Sun Jun 05 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 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 <code@musicinmybrain.net> - 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 <thrnciar@redhat.com> - 0.11.0-1
- Update to 0.11.0
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 0.9.1-6
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 0.9.1-3
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Oct 01 2019 Aurelien Bompard <abompard@fedoraproject.org> - 0.9.1-1
- Version 0.9.1
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.4-6
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sun Oct 21 2018 Miro Hrončok <mhroncok@redhat.com> - 0.7.4-3
- Drop python2 subpackage https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Jun 29 2018 Miro Hrončok <mhroncok@redhat.com> - 0.7.4-1
- Update to 0.7.4 (#1509750), fixes FTBFS (#1556222)
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6.5-8
- Rebuilt for Python 3.7
* Mon Mar 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 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 <releng@fedoraproject.org> - 0.6.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Jun 10 2017 Aurelien Bompard <abompard@fedoraproject.org> - 0.6.5-4
- Rename a BuildRequires
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.6.5-2
- Rebuild for Python 3.6
* Tue Sep 13 2016 Aurelien Bompard <abompard@fedoraproject.org> - 0.6.5-1
- Initial package.
## END: Generated by rpmautospec