Blob Blame Raw
# what it's called on pypi
%global srcname repomd
# what it's imported as
%global libname %{srcname}
# name of egg info directory
%global eggname %{srcname}
# package name fragment
%global pkgname %{srcname}

%global _description \
This library provides an object-oriented interface to get information out of\
dnf/yum repositories.

%bcond_without tests

Name:           python-%{pkgname}
Version:        0.2.1
Release:        1%{?dist}
Summary:        Library for reading dnf/yum repositories
License:        MIT
Source0:        %pypi_source
BuildArch:      noarch

%description %{_description}

%package -n python3-%{pkgname}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools >= 38.6.0
%if %{with tests}
BuildRequires:  python3-pytest
BuildRequires:  python3-defusedxml
BuildRequires:  python3-lxml
Requires:       python3-defusedxml
Requires:       python3-lxml
%{?python_provide:%python_provide python3-%{pkgname}}

%description -n python3-%{pkgname} %{_description}

%autosetup -n %{srcname}-%{version}
rm -r source/%{eggname}.egg-info setup.cfg



%if %{with tests}
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} --verbose tests

%files -n python3-%{pkgname}
%license LICENSE

* Mon Mar 25 2019 Carl George <> - 0.2.1-1
- Latest upstream

* Thu Mar 21 2019 Carl George <> - 0.2.0-1
- Latest upstream

* Sat Feb 02 2019 Fedora Release Engineering <> - 0.1.0-2
- Rebuilt for

* Sat Oct 27 2018 Carl George <> - 0.1.0-1
- Initial package