diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7a30b45 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/TestSlide-2.6.1.tar.gz diff --git a/python-TestSlide.spec b/python-TestSlide.spec new file mode 100644 index 0000000..6cdb989 --- /dev/null +++ b/python-TestSlide.spec @@ -0,0 +1,110 @@ +# requires sphinx_kr_theme which isn't packaged yet +%bcond_with docs + +# "_validate_return_type: passes for valid forward reference" fails +%bcond_with tests + +# Enable Python dependency generation +%{?python_enable_dependency_generator} + +# Created by pyp2rpm-3.3.4 +%global pypi_name TestSlide + +Name: python-%{pypi_name} +Version: 2.6.1 +Release: 2%{?dist} +Summary: A Python test framework + +License: MIT +URL: https://github.com/facebookincubator/TestSlide +# The PyPI tarball doesn't include tests, so use the original source instead +Source0: https://github.com/facebookincubator/TestSlide/archive/%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) >= 38.6 +BuildRequires: sed + +%if %{with docs} +# Docs requirements +BuildRequires: make +BuildRequires: ncurses +BuildRequires: python3dist(sphinx) +# Not available yet +# BuildRequires: python3dist(sphinx_kr_theme) +%endif + +%if %{with tests} +# Test requirements +BuildRequires: make +BuildRequires: python3dist(coverage) +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} + +%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. + + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +# Remove unneeded shebang +sed -e "\|#!/usr/bin/env python3|d" -i testslide/*.py + +%build +%py3_build +%if %{with docs} +make docs +%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 + +%changelog +* 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 diff --git a/sources b/sources new file mode 100644 index 0000000..b9bcb45 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (TestSlide-2.6.1.tar.gz) = 32faab3d057fa422664249cbf39bc407df7d00a882eae7f396a29c828eee6920692a46b1b48a4b3e3e62d78803892c6eb6dc1868e23c6f4195f23c01a6fd21de