33f97df
%global srcname etcd3gw
33f97df
44a7923
%if 0%{?fedora} && 0%{?fedora} < 30
44a7923
%bcond_without python2
44a7923
%bcond_without python3
44a7923
%else
Alan Pevec a5885ec
%if 0%{?fedora} || 0%{?rhel} > 7
Alan Pevec a5885ec
%bcond_with    python2
Alan Pevec a5885ec
%bcond_without python3
Alan Pevec a5885ec
%else
Alan Pevec a5885ec
%bcond_without python2
Alan Pevec a5885ec
%bcond_with    python3
Alan Pevec a5885ec
%endif
44a7923
%endif
Alan Pevec a5885ec
33f97df
Name:           python-%{srcname}
49c6c24
Version:        1.0.2
bcbc81c
Release:        1%{?dist}
33f97df
Summary:        An etcd3 gateway Python client
33f97df
33f97df
License:        ASL 2.0
33f97df
URL:            https://pypi.python.org/pypi/%{srcname}
33f97df
Source0:        %{pypi_source}
33f97df
33f97df
BuildArch:      noarch
33f97df
33f97df
%description
33f97df
A python client for etcd3 grpc-gateway v3alpha API
33f97df
Alan Pevec a5885ec
%if %{with python2}
Alan Pevec a5885ec
%package -n python2-%{srcname}
Alan Pevec a5885ec
Summary:        %{summary}
Alan Pevec a5885ec
BuildRequires:  python2-devel
Alan Pevec a5885ec
Alan Pevec a5885ec
BuildRequires:  python2-futurist
Alan Pevec a5885ec
BuildRequires:  python2-oslotest
c43f51f
BuildRequires:  python2-pytest
Alan Pevec a5885ec
BuildRequires:  python2-requests
Alan Pevec a5885ec
Alan Pevec a5885ec
Requires:  python2-futurist
Alan Pevec a5885ec
Requires:  python2-pbr
Alan Pevec a5885ec
Requires:  python2-requests
Alan Pevec a5885ec
Requires:  python2-six
Alan Pevec a5885ec
Alan Pevec a5885ec
%{?python_provide:%python_provide python2-%{srcname}}
Alan Pevec a5885ec
Alan Pevec a5885ec
%description -n python2-%{srcname}
Alan Pevec a5885ec
A python client for etcd3 grpc-gateway v3alpha API
Alan Pevec a5885ec
%endif
Alan Pevec a5885ec
Alan Pevec a5885ec
%if %{with python3}
33f97df
%package -n python3-%{srcname}
33f97df
Summary:        %{summary}
33f97df
BuildRequires:  python3-devel
33f97df
33f97df
BuildRequires:  python3-futurist
33f97df
BuildRequires:  python3-oslotest
c43f51f
BuildRequires:  python3-pytest
33f97df
BuildRequires:  python3-requests
33f97df
fba4361
Requires: python3-futurist
4d5bded
Requires: python3-pbr
fba4361
Requires: python3-requests
fba4361
Requires: python3-six
fba4361
33f97df
%{?python_enable_dependency_generator}
33f97df
33f97df
%{?python_provide:%python_provide python3-%{srcname}}
33f97df
33f97df
%description -n python3-%{srcname}
33f97df
A python client for etcd3 grpc-gateway v3alpha API
Alan Pevec a5885ec
%endif
33f97df
33f97df
%prep
33f97df
%autosetup -n %{srcname}-%{version}
33f97df
d585b46
# Let's manage dependencies using rpm deps.
d585b46
rm -f *requirements.txt
d585b46
33f97df
%build
Alan Pevec a5885ec
%if %{with python2}
Alan Pevec a5885ec
%py2_build
Alan Pevec a5885ec
%endif
Alan Pevec a5885ec
Alan Pevec a5885ec
%if %{with python3}
33f97df
%py3_build
Alan Pevec a5885ec
%endif
33f97df
33f97df
%install
Alan Pevec a5885ec
%if %{with python2}
Alan Pevec a5885ec
%py2_install
Alan Pevec a5885ec
%endif
Alan Pevec a5885ec
Alan Pevec a5885ec
%if %{with python3}
33f97df
%py3_install
Alan Pevec a5885ec
%endif
33f97df
33f97df
%check
Alan Pevec a5885ec
%if %{with python2}
Alan Pevec a5885ec
export PYTHON=%{__python2}
c43f51f
py.test
Alan Pevec a5885ec
%endif
Alan Pevec a5885ec
Alan Pevec a5885ec
%if %{with python3}
33f97df
export PYTHON=%{__python3}
44a7923
# workaround for https://bugs.launchpad.net/testrepository/+bug/1229445
44a7923
rm -rf .testrepository/times.dbm
c43f51f
py.test-3
Alan Pevec a5885ec
%endif
Alan Pevec a5885ec
Alan Pevec a5885ec
%if %{with python2}
Alan Pevec a5885ec
%files -n python2-%{srcname}
Alan Pevec a5885ec
%license LICENSE
Alan Pevec a5885ec
%doc README.md CONTRIBUTING.rst HACKING.rst
Alan Pevec a5885ec
%{python2_sitelib}/%{srcname}-*.egg-info/
Alan Pevec a5885ec
%{python2_sitelib}/%{srcname}/
Alan Pevec a5885ec
%endif
33f97df
Alan Pevec a5885ec
%if %{with python3}
33f97df
%files -n python3-%{srcname}
33f97df
%license LICENSE
33f97df
%doc README.md CONTRIBUTING.rst HACKING.rst
33f97df
%{python3_sitelib}/%{srcname}-*.egg-info/
33f97df
%{python3_sitelib}/%{srcname}/
Alan Pevec a5885ec
%endif
33f97df
33f97df
33f97df
%changelog
49c6c24
* Thu May 12 2022 John Eckersberg <jeckersb@redhat.com> - 1.0.2-1
49c6c24
- New upstream version 1.0.2 (rhbz#2082061)
49c6c24
bcbc81c
* Wed Feb  9 2022 John Eckersberg <jeckersb@redhat.com> - 1.0.1-1
bcbc81c
- New upstream version 1.0.1 (rhbz#2052448)
bcbc81c
2c6f3c8
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-3
2c6f3c8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
2c6f3c8
c333847
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-2
c333847
- Second attempt - Rebuilt for
c333847
  https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
c333847
edf49d5
* Thu Jul  1 2021 John Eckersberg <jeckersb@redhat.com> - 1.0.0-1
edf49d5
- New upstream version 1.0.0 (rhbz#1978274)
edf49d5
018225e
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.2.6-3
018225e
- Rebuilt for Python 3.10
018225e
ae479d2
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.6-2
ae479d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
ae479d2
1507369
* Thu Jul 30 2020 John Eckersberg <jeckersb@redhat.com> - 0.2.6-1
1507369
- New upstream version 0.2.6 (rhbz#1862104)
1507369
ef4dc5b
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5-3
ef4dc5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
ef4dc5b
ba2d511
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.2.5-2
ba2d511
- Rebuilt for Python 3.9
ba2d511
e21bb9f
* Tue Jan 28 2020 John Eckersberg <eck@redhat.com> - 0.2.5-1
e21bb9f
- New upstream version 0.2.5 (rhbz#1795745)
e21bb9f
ffc2f71
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.2.4-11
ffc2f71
- Rebuilt for Python 3.8.0rc1 (#1748018)
ffc2f71
09c9aac
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.2.4-10
09c9aac
- Rebuilt for Python 3.8
09c9aac
c43f51f
* Mon Jul 29 2019 Alfredo Moralejo <amoralej@redhat.com> - 0.2.4-9
c43f51f
- Use pytest to run unit tests
c43f51f
be35263
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-8
be35263
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
be35263
44a7923
* Fri Mar  8 2019 John Eckersberg <eck@redhat.com> - 0.2.4-7
44a7923
- Before f30, build for both py2 and py3
44a7923
- Add test workaround when run for both py2 and py3
44a7923
4d5bded
* Tue Mar  5 2019 John Eckersberg <eck@redhat.com> - 0.2.4-6
4d5bded
- Add missing req for python3-pbr
4d5bded
fba4361
* Tue Mar 05 2019 Eric Harney <eharney@redhat.com> - 0.2.4-5
fba4361
- Add missing reqs for python3
fba4361
0266371
* Mon Mar 04 2019 Eric Harney <eharney@redhat.com> - 0.2.4-4
0266371
- Remove runtime req on oslotest
0266371
d585b46
* Thu Feb 28 2019 Alfredo Moralejo <amoralej@redhat.com> - 0.2.4-3
d585b46
- Remve {test-,}requirements.txt to manage dependencies manually.
d585b46
33f97df
* Wed Feb 13 2019 John Eckersberg <eck@redhat.com> - 0.2.4-1
33f97df
- Initial package
33f97df