## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 7; 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 # EPEL is missing dependencies required for docs and tests %if 0%{?rhel} %bcond_with docs %bcond_with tests %else %bcond_without docs %bcond_without tests %endif %global modname testslide %global pypi_name TestSlide %global obs_verrel 2.6.4-99 Name: python-%{pypi_name} Version: 2.7.1 Release: %autorelease Summary: A Python test framework License: MIT URL: https://github.com/facebook/TestSlide # The PyPI tarball doesn't include tests, so use the original source instead Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz # Updating Testslide to typeguard 3.02 # https://github.com/facebook/TestSlide/pull/352 # # Rebased to 2.7.1; version bound loosened to allow 4.x as well as 3.x Patch0: TestSlide-2.7.1-typeguard-4.patch BuildArch: noarch BuildRequires: python3-devel %if %{with docs} # Docs requirements BuildRequires: make BuildRequires: /usr/bin/tput BuildRequires: python3-ipython-sphinx %endif %if %{with tests} # Test requirements BuildRequires: python3dist(pytest) %endif %global _description %{expand: A test framework for Python that enable unit testing / TDD / BDD to be productive and enjoyable. Its well behaved mocks with thorough API validations catches bugs both when code is first written or long in the future when it is changed. The flexibility of using them with existing unittest.TestCase or TestSlide's own test runner let users get its benefits without requiring refactoring existing code.} %description %{_description} %package -n python3-%{modname} Summary: %{summary} Provides: python3-%{pypi_name} = %{version}-%{release} Obsoletes: python3-%{pypi_name} < %{obs_verrel} %description -n python3-%{modname} %{_description} %if %{with docs} %package -n python3-%{modname}-docs Summary: Documentation for python3-%{pypi_name} Provides: python3-%{pypi_name}-docs = %{version}-%{release} Obsoletes: python3-%{pypi_name} < %{obs_verrel} %description -n python3-%{modname}-docs %{_description} The python3-%{modname}-docs package contains documentation for python3-%{modname}. %endif %prep %autosetup -n %{pypi_name}-%{version} -p1 # remove unnecessary test BRs sed -r -i '/^(black|coverage|coveralls|flake8|isort|mypy|twine)/d' \ requirements-dev.txt sed -r -i 's/^([[:blank:]]*)("COVERAGE_PROCESS_START")/\1# \2/' \ tests/cli_unittest.py sed -i '/^sphinx-autobuild/d' requirements-dev.txt %generate_buildrequires %pyproject_buildrequires -r requirements-dev.txt %build %pyproject_wheel %if %{with docs} make docs V=1 %endif %install %pyproject_install %pyproject_save_files %{modname} %if %{with tests} %check %pytest tests/*_unittest.py tests/*_testslide.py %endif %files -n python3-%{modname} -f %{pyproject_files} %license LICENSE %doc README.md %{_bindir}/testslide %if %{with docs} %files -n python3-%{modname}-docs %doc docs/_build/html %endif %changelog ## START: Generated by rpmautospec * Fri Jan 26 2024 Fedora Release Engineering - 2.7.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 2.7.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 2.7.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jul 13 2023 Benjamin A. Beasley - 2.7.1-4 - Support TypeGuard 3.x/4.x * Sun Jul 02 2023 Python Maint - 2.7.1-3 - Rebuilt for Python 3.12 * Tue Jun 27 2023 Michel Alexandre Salim - 2.7.1-2 - Rebuild with fixed source tarball * Fri May 12 2023 Benjamin A. Beasley - 2.7.1-1 - Update to 2.7.1 (close RHBZ#2179100, close RHBZ#2166612) * Fri May 12 2023 Benjamin A. Beasley - 2.7.0-9 - Remove more unnecessary test BR’s * Fri May 12 2023 Benjamin A. Beasley - 2.7.0-8 - Add missing BR on python3-ipython-sphinx * Fri Jan 20 2023 Fedora Release Engineering - 2.7.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Aug 09 2022 Davide Cavalca - 2.7.0-6 - Backport upstream fix for Sphinx config; Fixes: RHBZ#2113613 * Fri Jul 22 2022 Fedora Release Engineering - 2.7.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Jun 30 2022 Davide Cavalca - 2.7.0-4 - Backport upstream fixes for Python 3.11; Fixes: RHBZ#2098802 * Fri Jun 17 2022 Python Maint - 2.7.0-3 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 2.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Jan 06 2022 Michel Alexandre Salim - 2.7.0-1 - Update to 2.7.0; use automatic BRs * Fri Jul 23 2021 Fedora Release Engineering - 2.6.4-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jul 13 2021 Davide Cavalca - 2.6.4-11 - Backport PR#308 for a typechecking issue; Fixes: RHBZ#1981718 * Tue Jul 13 2021 Davide Cavalca - 2.6.4-10 - Update URL * Tue Jul 13 2021 Davide Cavalca - 2.6.4-9 - Drop logic for retired releases * Fri Jun 04 2021 Python Maint - 2.6.4-5 - Rebuilt for Python 3.10 * Thu Apr 15 2021 Davide Cavalca - 2.6.4-4 - Backport PR#297 for Python 3.10 compatibility (#1944109) * Wed Jan 27 2021 Fedora Release Engineering - 2.6.4-3.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Thu Jan 14 2021 Michel Alexandre Salim - 2.6.4-2.1 - Fix documentation build and skip some lints on F32 and below * Tue Jan 5 2021 Davide Cavalca - 2.6.4-2 - Backport PR#271, PR#272 and PR#273 to adjust requirements for EPEL 8 * Sat Jan 2 2021 Davide Cavalca - 2.6.4-1 - New upstream release * Wed Dec 30 2020 Davide Cavalca - 2.6.3-2 - Build for EPEL 8 * Thu Nov 12 2020 Davide Cavalca - 2.6.3-1 - New upstream release * Mon Nov 2 2020 Davide Cavalca - 2.6.1-3 - Backport PR#260, PR#261, PR#262 - Add py_provides for F32 - Build and package docs - Run tests * Tue Oct 27 2020 Davide Cavalca - 2.6.1-2 - Update BuildRequires - Remove unneeded shebangs - Drop unnecessary python_provide macro * Tue Oct 27 2020 Davide Cavalca - 2.6.1-1 - Initial package - Disable tests and docs for now ## END: Generated by rpmautospec