diff --git a/.gitignore b/.gitignore index b0b00db..20376e7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /openQA-python-client-080d03858b7b12f144770af8ceb938fe6c7dbb11.tar.gz /openQA-python-client-1.3.2.tar.gz /openQA-python-client-2.0.0.tar.gz +/openQA-python-client-3.0.4.tar.gz diff --git a/python-openqa_client.spec b/python-openqa_client.spec index 149dd34..9acd1ad 100644 --- a/python-openqa_client.spec +++ b/python-openqa_client.spec @@ -7,8 +7,8 @@ %bcond_with python3 %endif -# Disable Python 2 builds for Fedora > 29, EPEL > 7 -%if 0%{?fedora} > 29 || 0%{?rhel} > 7 +# Disable Python 2 builds for Fedora, EPEL > 7 +%if 0%{?fedora} || 0%{?rhel} > 7 %bcond_with python2 %global obsolete2 1 %else @@ -22,7 +22,7 @@ openQA web API, using the requests HTTP request library. %global github_owner os-autoinst %global github_name openQA-python-client -%global github_version 2.0.0 +%global github_version 3.0.4 # if set, will be a post-release snapshot build, otherwise a 'normal' build #global github_commit 080d03858b7b12f144770af8ceb938fe6c7dbb11 #global github_date 20170130 @@ -30,7 +30,7 @@ openQA web API, using the requests HTTP request library. Name: python-openqa_client Version: %{github_version} -Release: 2%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Release: 1%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} Summary: %{sum} License: GPLv2+ @@ -47,6 +47,12 @@ BuildArch: noarch Summary: %{sum} BuildRequires: python2-devel BuildRequires: python2-setuptools +# test requirements +BuildRequires: python2-pytest +BuildRequires: python2-freezegun +BuildRequires: python2-mock +BuildRequires: python2-requests +BuildRequires: python2-six %{?python_provide:%python_provide python2-openqa_client} Requires: python2-requests Requires: python2-six @@ -62,6 +68,10 @@ Python 2 build. Summary: %{sum} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-freezegun +BuildRequires: python%{python3_pkgversion}-requests +BuildRequires: python%{python3_pkgversion}-six %{?python_provide:%python_provide python%{python3_pkgversion}-openqa_client} %if 0%{?obsolete2} Obsoletes: python2-openqa_client < %{version}-%{release} @@ -114,9 +124,18 @@ Python %{python3_other_pkgversion} build. %endif # with_python3_other %endif # with_python3 - %check -# FIXME: there are no tests yet. Bad me. +# we're not supposed to use setup.py test any more, apparently, but +# the shiny/scary new pyproject-rpm-macros stuff isn't available on +# EPEL yet, so...let's just try and use py.test directly, against +# the path we installed to. +%if 0%{?with_python2} +PYTHONPATH=%{buildroot}%{python2_sitelib} py.test +%endif # with_python3 +%if 0%{?with_python3} +PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 +%endif # with_python3 + %if 0%{?with_python2} %files -n python2-openqa_client @@ -141,6 +160,10 @@ Python %{python3_other_pkgversion} build. %changelog +* Thu Feb 27 2020 Adam Williamson - 3.0.4-1 +- New release 3.0.4 +- Run tests in %check (now there are some) + * Thu Jan 30 2020 Fedora Release Engineering - 2.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index 62694c4..6833db7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (openQA-python-client-2.0.0.tar.gz) = 89011b6427e98e8aa4c6c8fa9fd146e6dfef462e7f2d6b748458dee915ab85b7843faec07376f890437b0c2805b2453bbe4fa9fb6a8318ea2440ea66769fc987 +SHA512 (openQA-python-client-3.0.4.tar.gz) = 86078e5651e194bdc034c788b64a6a7c340137f3c86e834ab47e21494797b20dc20680a83fd756c2db2c7ce1594bbaf3727447ff946579a050ab111605ca2db5