## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 12; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?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 pypi_name TestSlide Name: python-%{pypi_name} Version: 2.6.4 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}.tar.gz#/%{pypi_name}-%{version}.tar.gz # PR#271: move dependency management to requirements.txt and requirements-dev.txt Patch0: %{url}/commit/9a62c484ca9360ea8dfca82b244589c733182449.patch # PR#272: requirements: relax dataclasses version dependency Patch1: %{url}/commit/f0a82aa1bf93863794e8a9867cb34df14fdf62a4.patch # PR#273: requirements: allow Pygments 2.2.0 or later Patch2: %{url}/commit/fa69263d6eaf07df5090dad4c199d1c6d14abf05.patch # PR#297: Use get_typing_hints instead of __annotations__ to resolve types in Python 3.10 Patch5: %{url}/commit/44990479e035a05fc265e7e88c8a14f5c01590d2.patch # Backport of PR#308: Fix typechecking issue with Python 3.10 Patch6: TestSlide-fix-typechecking.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(setuptools) >= 38.6 BuildRequires: sed %if %{with docs} # Docs requirements BuildRequires: make BuildRequires: ncurses BuildRequires: python3-ipython BuildRequires: python3dist(sphinx) BuildRequires: python3dist(sphinx-kr-theme) %endif %if %{with tests} # Test requirements BuildRequires: black BuildRequires: make BuildRequires: python3dist(coverage) BuildRequires: python3dist(flake8) BuildRequires: python3dist(isort) BuildRequires: python3dist(mypy) BuildRequires: python3dist(psutil) BuildRequires: python3dist(pygments) BuildRequires: python3dist(typeguard) %endif %description 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. %package -n python3-%{pypi_name} Summary: %{summary} %if 0%{?el8} %py_provides python3-%{pypi_name} %endif %description -n python3-%{pypi_name} 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. %if %{with docs} %package -n python3-%{pypi_name}-docs Summary: Documentation for python3-%{pypi_name} %description -n python3-%{pypi_name}-docs The python3-%{pypi_name}-docs package contains documentation for python3-%{pypi_name}. %endif %prep %autosetup -n %{pypi_name}-%{version} -p1 # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py3_build %if %{with docs} make docs V=1 %endif %install %py3_install %if %{with tests} %check export PYTHONPATH=%{buildroot}%{python3_sitelib} make tests V=1 %endif %files -n python3-%{pypi_name} %license LICENSE %doc README.md %{_bindir}/testslide %{python3_sitelib}/testslide %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %if %{with docs} %files -n python3-%{pypi_name}-docs %doc docs/_build/html %endif %changelog * 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