2020-03-02 10:56:15 +00:00
|
|
|
%global pypi_name openqa_client
|
|
|
|
Name: python-%{pypi_name}
|
|
|
|
Version: 4.0.0
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Python client library for openQA API
|
|
|
|
|
|
|
|
License: GPLv2+
|
|
|
|
URL: https://github.com/os-autoinst/openQA-python-client
|
|
|
|
Source0: %{pypi_source}
|
|
|
|
|
|
|
|
BuildArch: noarch
|
2020-10-26 15:11:32 +00:00
|
|
|
BuildRequires: python3-devel
|
2020-03-02 10:56:15 +00:00
|
|
|
BuildRequires: pyproject-rpm-macros
|
|
|
|
|
|
|
|
%description
|
|
|
|
This package uses tox.ini file with recursive deps (via the -r option).
|
|
|
|
|
2020-04-15 14:44:04 +00:00
|
|
|
|
2020-03-02 10:56:15 +00:00
|
|
|
%package -n python3-%{pypi_name}
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
%description -n python3-%{pypi_name}
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n %{pypi_name}-%{version}
|
|
|
|
# setuptools-git is needed to build the source distribution, but not
|
|
|
|
# for packaging, which *starts* from the source distribution
|
2020-04-15 14:44:04 +00:00
|
|
|
# we sed it out to save ourselves a dependency, but that is not strictly required
|
2020-03-02 10:56:15 +00:00
|
|
|
sed -i -e 's., "setuptools-git"..g' pyproject.toml
|
|
|
|
|
2022-03-17 15:16:06 +00:00
|
|
|
# the tests don't actually need mock, they use unittest.mock
|
|
|
|
# https://github.com/os-autoinst/openQA-python-client/pull/21
|
|
|
|
sed -i '/mock/d' tests.requires
|
|
|
|
|
2020-04-15 14:44:04 +00:00
|
|
|
|
2020-03-02 10:56:15 +00:00
|
|
|
%generate_buildrequires
|
|
|
|
%pyproject_buildrequires -t
|
|
|
|
|
2020-04-15 14:44:04 +00:00
|
|
|
|
2020-03-02 10:56:15 +00:00
|
|
|
%build
|
|
|
|
%pyproject_wheel
|
|
|
|
|
2020-04-15 14:44:04 +00:00
|
|
|
|
2020-03-02 10:56:15 +00:00
|
|
|
%install
|
|
|
|
%pyproject_install
|
2023-09-27 12:37:15 +00:00
|
|
|
%pyproject_save_files -l %{pypi_name}
|
2020-04-15 14:44:04 +00:00
|
|
|
|
2020-03-02 10:56:15 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
%tox
|
|
|
|
|
|
|
|
|
2020-04-15 14:44:04 +00:00
|
|
|
%files -n python3-%{pypi_name} -f %{pyproject_files}
|
2020-03-02 10:56:15 +00:00
|
|
|
%doc README.*
|