Blob Blame History Raw
%global         srcname     DBUtils

Name:           python-dbutils
Version:        2.0.2
Release:        2%{?dist}
Summary:        Tools providing solid, persistent and pooled connections to a database
License:        MIT
URL:            https://pypi.org/project/%{srcname}/
Source0:        %pypi_source

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(docutils)


%global _description %{expand:
DBUtils is a suite of tools providing solid, persistent and pooled connections
to a database that can be used in all kinds of multi-threaded environments.

The suite supports DB-API 2 compliant database interfaces.}

%description %{_description}


%package -n python3-dbutils
Summary:        %{summary}
# python3 renamed this to lower case, provide the upcase
# name for simplified compatibility
%py_provides python3-DBUtils

%description -n python3-dbutils %{_description}

%package doc
Summary:        %{summary}
%description doc %{_description}


%prep
%autosetup -n %{srcname}-%{version}


%build
%py3_build

# make docs
pushd docs
%{python3} make.py
popd

%install
%py3_install

# install docs
install -t '%{buildroot}%{_pkgdocdir}' -D -p -m 0644 README.md
pushd docs
install -t '%{buildroot}%{_pkgdocdir}/html' -D -p -m 0644 *.html *.css *.png
popd


%check
%{python3} -m unittest discover -v .


%files -n python3-dbutils
%license LICENSE
%{python3_sitelib}/dbutils
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info

%files doc
%license LICENSE
%doc %{_pkgdocdir}

%changelog
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-2
- Second attempt - Rebuilt for
  https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Thu Jul 8 2021 Pat Riehecky <riehecky@fnal.gov> - 2.0.2-1
- Update to current RHBZ: 1980508

* Thu Jun 17 2021 Pat Riehecky <riehecky@fnal.gov> - 2.0.1-1
- Initial package.