Blob Blame History Raw
%global pypi_name connection_pool
%global src_name ConnectionPool

%global _description %{expand:
python-connection_pool provides a wrapper to maintain a cache of connections 
to databases or other repositories. A connection pool enhances the performance 
of executing commands on databases as it reduces the cost of opening/closing 
database connections.}

Name:           python-%{pypi_name}
Version:        0.0.3
Release:        3%{?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
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.3-3
- Second attempt - Rebuilt for
  https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Tue Jun 22 2021 Aniket Pradhan <major AT fedoraproject DOT org> - 0.0.3-2
- Update package description

* Sat Jun 19 2021 Aniket Pradhan <major AT fedoraproject DOT org> - 0.0.3-1
- Initial build