From 4838973d1deaaa03b77dc9ccba9dd0b4dc2bf556 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Feb 16 2017 15:39:00 +0000 Subject: Initial import (review: #1422689) --- diff --git a/.gitignore b/.gitignore index e69de29..c26a18f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/openQA-python-client-184e6c8415ef3b0667caf8f8a440007d6b98ba93.tar.gz diff --git a/python-openqa_client.spec b/python-openqa_client.spec new file mode 100644 index 0000000..7185a07 --- /dev/null +++ b/python-openqa_client.spec @@ -0,0 +1,132 @@ +# Enable Python 3 builds for Fedora + EPEL >5 +%if 0%{?fedora} || 0%{?epel} > 5 +# If the definition isn't available for python3_pkgversion, define it +%{?!python3_pkgversion:%global python3_pkgversion 3} +%bcond_without python3 +%else +%bcond_with python3 +%endif + +%global sum Python client library for openQA API +%global desc The openqa_client Python library provides convenient access to the \ +openQA web API, using the requests HTTP request library. + +%global github_owner os-autoinst +%global github_name openQA-python-client +%global github_version 1.3.0 +%global github_commit 184e6c8415ef3b0667caf8f8a440007d6b98ba93 +# if set, will be a post-release snapshot build, otherwise a 'normal' build +#global github_date 20170130 +%global shortcommit %(c=%{github_commit}; echo ${c:0:7}) + +Name: python-openqa_client +Version: %{github_version} +Release: 1%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Summary: %{sum} + +License: GPLv2+ +URL: https://github.com/%{github_owner}/%{github_name}/ +Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{github_name}-%{github_commit}.tar.gz +BuildArch: noarch + +BuildRequires: python2-devel +# No python2-setuptools on EPEL +BuildRequires: python-setuptools +%if 0%{?with_python3} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +%if 0%{?with_python3_other} +BuildRequires: python%{python3_other_pkgversion}-devel +BuildRequires: python%{python3_other_pkgversion}-setuptools +%endif # with_python3_other +%endif # with_python3 + +%description +%{desc} + + +%package -n python2-openqa_client +Summary: %{sum} +%{?python_provide:%python_provide python2-openqa_client} +# No python2-foo on EPEL +Requires: python-requests +Requires: python-six + +%description -n python2-openqa_client +%{desc} This is the +Python 2 build. + + +%if 0%{?with_python3} +%package -n python%{python3_pkgversion}-openqa_client +Summary: %{sum} +%{?python_provide:%python_provide python%{python3_pkgversion}-openqa_client} +Requires: python%{python3_pkgversion}-requests +Requires: python%{python3_pkgversion}-six + +%description -n python%{python3_pkgversion}-openqa_client +%{desc} This is the +Python %{python3_pkgversion} build. + +%if 0%{?with_python3_other} +%package -n python%{python3_other_pkgversion}-openqa_client +Summary: %{sum} +%{?python_provide:%python_provide python%{python3_other_pkgversion}-openqa_client} +Requires: python%{python3_other_pkgversion}-requests +Requires: python%{python3_other_pkgversion}-six + +%description -n python%{python3_other_pkgversion}-openqa_client +%{desc} This is the +Python %{python3_other_pkgversion} build. +%endif # with_python3_other +%endif # with_python3 + + +%prep +%autosetup -p1 -n %{github_name}-%{github_commit} + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%if 0%{?with_python3_other} +%py3_other_build +%endif # with_python3_other +%endif # with_python3 + +%install +%py2_install +%if 0%{?with_python3} +%py3_install +%if 0%{?with_python3_other} +%py3_other_install +%endif # with_python3_other +%endif # with_python3 + + +%check +# FIXME: there are no tests yet. Bad me. + +%files -n python2-openqa_client +%doc README.md CHANGELOG.md +%license COPYING +%{python2_sitelib}/openqa_client* + +%if 0%{?with_python3} +%files -n python%{python3_pkgversion}-openqa_client +%doc README.md CHANGELOG.md +%license COPYING +%{python3_sitelib}/openqa_client* + +%if 0%{?with_python3_other} +%files -n python%{python3_other_pkgversion}-openqa_client +%doc README.md CHANGELOG.md +%license COPYING +%{python3_other_sitelib}/openqa_client* +%endif # with_python3_other +%endif # with_python3 + + +%changelog +* Wed Feb 15 2017 Adam Williamson - 1.3.0-1 +- Initial package diff --git a/sources b/sources index e69de29..01fc6d1 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (openQA-python-client-184e6c8415ef3b0667caf8f8a440007d6b98ba93.tar.gz) = d22e203493b73cdd97441fb967a270409e58f3cbb3757ea100501afdec1c7208bb92c43e4175d367d5fef140f4b181050e8b0c6275ec7b8349dd040b29582e8b