Name: python-utils Version: 2.5.6 Release: 1%{?dist} Summary: Python Utils is a module with some convenient utilities License: BSD URL: https://github.com/WoLpH/python-utils Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: epel-rpm-macros BuildRequires: make BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pytest-runner BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-six BuildRequires: python%{python3_pkgversion}-sphinx %?python_enable_dependency_generator %description Python Utils is a collection of small Python functions and classes which make common patterns shorter and easier. This module makes it easy to execute common tasks in Python scripts such as converting text to numbers and making sure a string is in unicode or bytes format. %package -n python%{python3_pkgversion}-utils Summary: %{summary} %description -n python%{python3_pkgversion}-utils Python Utils is a collection of small Python functions and classes which make common patterns shorter and easier. This module makes it easy to execute common tasks in Python scripts such as converting text to numbers and making sure a string is in unicode or bytes format. %prep %autosetup -p1 -n %{name}-%{version} # Remove bundled egg-info rm -rf %{name}.egg-info # Stop linting code in %%check and measuring coverage, this is upstream's business sed -Ei '/--(cov|pep8|flake8)/d' pytest.ini sed -Ezi 's/flake8.+=.+\n(\s*\S+\s*\n)*\n/\n/' pytest.ini %build %py3_build # generate html docs sphinx-build-3 docs html # remove the sphinx-build leftovers rm -rf html/{.doctrees,.buildinfo,*.inv} %install %py3_install %check %{pytest} %files -n python%{python3_pkgversion}-utils %doc README.rst html %license LICENSE %{python3_sitelib}/python_utils %{python3_sitelib}/python_utils-%{version}-py%{python3_version}.egg-info %changelog * Tue Mar 09 2021 Camille Gardet 2.5.6-1 - Initial package