Blame python-TestSlide.spec

0ac3050
# requires sphinx_kr_theme which isn't packaged yet
0ac3050
%bcond_with docs
0ac3050
0ac3050
# "_validate_return_type: passes for valid forward reference" fails
0ac3050
%bcond_with tests
0ac3050
0ac3050
# Enable Python dependency generation
0ac3050
%{?python_enable_dependency_generator}
0ac3050
0ac3050
# Created by pyp2rpm-3.3.4
0ac3050
%global pypi_name TestSlide
0ac3050
0ac3050
Name:           python-%{pypi_name}
0ac3050
Version:        2.6.1
0ac3050
Release:        2%{?dist}
0ac3050
Summary:        A Python test framework
0ac3050
0ac3050
License:        MIT
0ac3050
URL:            https://github.com/facebookincubator/TestSlide
0ac3050
# The PyPI tarball doesn't include tests, so use the original source instead
0ac3050
Source0:        https://github.com/facebookincubator/TestSlide/archive/%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz
0ac3050
BuildArch:      noarch
0ac3050
0ac3050
BuildRequires:  python3-devel
0ac3050
BuildRequires:  python3dist(setuptools) >= 38.6
0ac3050
BuildRequires:  sed
0ac3050
0ac3050
%if %{with docs}
0ac3050
# Docs requirements
0ac3050
BuildRequires:  make
0ac3050
BuildRequires:  ncurses
0ac3050
BuildRequires:  python3dist(sphinx)
0ac3050
# Not available yet
0ac3050
# BuildRequires: python3dist(sphinx_kr_theme)
0ac3050
%endif
0ac3050
0ac3050
%if %{with tests}
0ac3050
# Test requirements
0ac3050
BuildRequires:  make
0ac3050
BuildRequires:  python3dist(coverage)
0ac3050
BuildRequires:  python3dist(psutil)
0ac3050
BuildRequires:  python3dist(pygments)
0ac3050
BuildRequires:  python3dist(typeguard)
0ac3050
%endif
0ac3050
0ac3050
%description
0ac3050
A test framework for Python that enable unit testing / TDD / BDD to be
0ac3050
productive and enjoyable.
0ac3050
0ac3050
Its well behaved mocks with thorough API validations catches bugs both
0ac3050
when code is first written or long in the future when it is changed.
0ac3050
0ac3050
The flexibility of using them with existing unittest.TestCase or TestSlide's
0ac3050
own test runner let users get its benefits without requiring refactoring
0ac3050
existing code.
0ac3050
0ac3050
%package -n     python3-%{pypi_name}
0ac3050
Summary:        %{summary}
0ac3050
0ac3050
%description -n python3-%{pypi_name}
0ac3050
A test framework for Python that enable unit testing / TDD / BDD to be
0ac3050
productive and enjoyable.
0ac3050
0ac3050
Its well behaved mocks with thorough API validations catches bugs both
0ac3050
when code is first written or long in the future when it is changed.
0ac3050
0ac3050
The flexibility of using them with existing unittest.TestCase or TestSlide's
0ac3050
own test runner let users get its benefits without requiring refactoring
0ac3050
existing code.
0ac3050
0ac3050
0ac3050
%prep
0ac3050
%autosetup -n %{pypi_name}-%{version}
0ac3050
# Remove bundled egg-info
0ac3050
rm -rf %{pypi_name}.egg-info
0ac3050
0ac3050
# Remove unneeded shebang
0ac3050
sed -e "\|#!/usr/bin/env python3|d" -i testslide/*.py
0ac3050
0ac3050
%build
0ac3050
%py3_build
0ac3050
%if %{with docs}
0ac3050
make docs
0ac3050
%endif
0ac3050
0ac3050
%install
0ac3050
%py3_install
0ac3050
0ac3050
%if %{with tests}
0ac3050
%check
0ac3050
export PYTHONPATH=%{buildroot}%{python3_sitelib}
0ac3050
make tests V=1
0ac3050
%endif
0ac3050
0ac3050
%files -n python3-%{pypi_name}
0ac3050
%license LICENSE
0ac3050
%doc README.md
0ac3050
%{_bindir}/testslide
0ac3050
%{python3_sitelib}/testslide
0ac3050
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
0ac3050
0ac3050
%changelog
0ac3050
* Tue Oct 27 2020 Davide Cavalca <dcavalca@fb.com> - 2.6.1-2
0ac3050
- Update BuildRequires
0ac3050
- Remove unneeded shebangs
0ac3050
- Drop unnecessary python_provide macro
0ac3050
0ac3050
* Tue Oct 27 2020 Davide Cavalca <dcavalca@fb.com> - 2.6.1-1
0ac3050
- Initial package
0ac3050
- Disable tests and docs for now