%global pypi_name connection_pool %global src_name ConnectionPool %global _description %{expand: Thread-safe connection pool for python} Name: python-%{pypi_name} Version: 0.0.3 Release: 1%{?dist} Summary: Thread-safe connection pool for python License: MIT URL: https://github.com/zhouyl/%{src_name} Source0: https://github.com/zhouyl/%{src_name}/archive/%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %description %_description %package -n python3-%{pypi_name} Summary: %{summary} BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} %py_provides python3-%{pypi_name} %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{src_name}-%{version} rm -rf %{pypi_name}.egg-info find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' %build %py3_build %install %py3_install # No test files %files -n python3-%{pypi_name} %doc README.rst %license LICENSE %{python3_sitelib}/%{pypi_name}/ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ %changelog * Sat Jun 19 2021 Aniket Pradhan - 0.0.3-1 - Initial build