99d952c
%global pypi_name openqa_client
99d952c
Name:           python-%{pypi_name}
99d952c
Version:        4.0.0
99d952c
Release:        1%{?dist}
99d952c
Summary:        Python client library for openQA API
99d952c
99d952c
License:        GPLv2+
99d952c
URL:            https://github.com/os-autoinst/openQA-python-client
99d952c
Source0:        %{pypi_source}
99d952c
99d952c
BuildArch:      noarch
99d952c
BuildRequires:  pyproject-rpm-macros
99d952c
99d952c
%description
99d952c
This package uses tox.ini file with recursive deps (via the -r option).
99d952c
2800b49
99d952c
%package -n python3-%{pypi_name}
99d952c
Summary:        %{summary}
99d952c
99d952c
%description -n python3-%{pypi_name}
99d952c
%{summary}.
99d952c
99d952c
99d952c
%prep
99d952c
%autosetup -p1 -n %{pypi_name}-%{version}
99d952c
# setuptools-git is needed to build the source distribution, but not
99d952c
# for packaging, which *starts* from the source distribution
2800b49
# we sed it out to save ourselves a dependency, but that is not strictly required
99d952c
sed -i -e 's., "setuptools-git"..g' pyproject.toml
99d952c
2800b49
99d952c
%generate_buildrequires
99d952c
%pyproject_buildrequires -t
99d952c
2800b49
99d952c
%build
99d952c
%pyproject_wheel
99d952c
2800b49
99d952c
%install
99d952c
%pyproject_install
2800b49
%pyproject_save_files %{pypi_name}
2800b49
99d952c
99d952c
%check
99d952c
%tox
99d952c
99d952c
2800b49
%files -n python3-%{pypi_name} -f %{pyproject_files}
99d952c
%doc README.*
99d952c
%license COPYING