c947fb1
%global reltag post1
cdc4a3c
cdc4a3c
%if 0%{?fedora} > 33 || 0%{?rhel} > 8
cdc4a3c
%global with_py2 0
cdc4a3c
%else
fe4a31e
%global with_py2 1
cdc4a3c
%endif
c947fb1
2c5e3a4
Name:			python-oauth2
2c5e3a4
Summary:		Python support for improved oauth
c947fb1
Version:		1.9.0
2a844cb
Release:		31.%{reltag}%{?dist}
2c5e3a4
License:		MIT
c947fb1
Source0:		http://pypi.python.org/packages/source/o/oauth2/oauth2-%{version}.%{reltag}.tar.gz
9e1ddf6
# https://github.com/pmakowski/python-oauth2/commit/7002422bb39bc137713933bc2e55251853830fcc
c947fb1
Patch1:			python-oauth2-1.9.0-CVE-2013-4346.patch
2c5e3a4
URL:			http://pypi.python.org/pypi/oauth2/
2c5e3a4
BuildArch:		noarch
fe4a31e
%if 0%{?with_py2}
fe4a31e
BuildRequires:		python2-devel, python2-setuptools
fe4a31e
%endif
e63332a
BuildRequires:		python3-devel
bae9030
BuildRequires:		python3-setuptools
93565c5
# These are the test requires, but since we don't run the tests, we disable them here.
46a3df5
# BuildRequires:	python2-mock, python2-httplib2, python2-coverage
fe4a31e
%if 0%{?with_py2}
fe4a31e
Requires:		python2-httplib2
fe4a31e
%endif
2c5e3a4
2c5e3a4
%description
2c5e3a4
Oauth2 was originally forked from Leah Culver and Andy Smith's oauth.py 
2c5e3a4
code. Some of the tests come from a fork by Vic Fryzel, while a revamped 
2c5e3a4
Request class and more tests were merged in from Mark Paschal's fork. A 
2c5e3a4
number of notable differences exist between this code and its forefathers:
2c5e3a4
2c5e3a4
- 100% unit test coverage.
2c5e3a4
- The DataStore object has been completely ripped out. While creating unit 
2c5e3a4
  tests for the library I found several substantial bugs with the 
2c5e3a4
  implementation and confirmed with Andy Smith that it was never fully 
2c5e3a4
  baked.
2c5e3a4
- Classes are no longer prefixed with OAuth.
2c5e3a4
- The Request class now extends from dict.
2c5e3a4
- The library is likely no longer compatible with Python 2.3.
2c5e3a4
- The Client class works and extends from httplib2. It's a thin wrapper 
2c5e3a4
  that handles automatically signing any normal HTTP request you might 
2c5e3a4
  wish to make.
2c5e3a4
fe4a31e
%if 0%{?with_py2}
c947fb1
%package -n python2-oauth2
c947fb1
Summary:        Python support for improved oauth
c947fb1
%{?python_provide:%python_provide python2-oauth2}
c947fb1
c947fb1
%description -n python2-oauth2
c947fb1
Oauth2 was originally forked from Leah Culver and Andy Smith's oauth.py 
c947fb1
code. Some of the tests come from a fork by Vic Fryzel, while a revamped 
c947fb1
Request class and more tests were merged in from Mark Paschal's fork. A 
c947fb1
number of notable differences exist between this code and its forefathers:
c947fb1
c947fb1
- 100% unit test coverage.
c947fb1
- The DataStore object has been completely ripped out. While creating unit 
c947fb1
  tests for the library I found several substantial bugs with the 
c947fb1
  implementation and confirmed with Andy Smith that it was never fully 
c947fb1
  baked.
c947fb1
- Classes are no longer prefixed with OAuth.
c947fb1
- The Request class now extends from dict.
c947fb1
- The library is likely no longer compatible with Python 2.3.
c947fb1
- The Client class works and extends from httplib2. It's a thin wrapper 
c947fb1
  that handles automatically signing any normal HTTP request you might 
c947fb1
  wish to make.
fe4a31e
%endif
c947fb1
c947fb1
%package -n python3-oauth2
c947fb1
Summary:        Python support for improved oauth
c947fb1
%{?python_provide:%python_provide python3-oauth2}
c947fb1
c947fb1
%description -n python3-oauth2
c947fb1
Oauth2 was originally forked from Leah Culver and Andy Smith's oauth.py 
c947fb1
code. Some of the tests come from a fork by Vic Fryzel, while a revamped 
c947fb1
Request class and more tests were merged in from Mark Paschal's fork. A 
c947fb1
number of notable differences exist between this code and its forefathers:
c947fb1
c947fb1
- 100% unit test coverage.
c947fb1
- The DataStore object has been completely ripped out. While creating unit 
c947fb1
  tests for the library I found several substantial bugs with the 
c947fb1
  implementation and confirmed with Andy Smith that it was never fully 
c947fb1
  baked.
c947fb1
- Classes are no longer prefixed with OAuth.
c947fb1
- The Request class now extends from dict.
c947fb1
- The library is likely no longer compatible with Python 2.3.
c947fb1
- The Client class works and extends from httplib2. It's a thin wrapper 
c947fb1
  that handles automatically signing any normal HTTP request you might 
c947fb1
  wish to make.
c947fb1
2c5e3a4
%prep
c947fb1
%setup -q -n oauth2-%{version}.%{reltag}
9e1ddf6
%patch1 -p1 -b .CVE-2013-4346
2c5e3a4
2c5e3a4
%build
fe4a31e
%if 0%{?with_py2}
c947fb1
%py2_build
fe4a31e
%endif
c947fb1
%py3_build
2c5e3a4
2c5e3a4
%install
fe4a31e
%if 0%{?with_py2}
c947fb1
%py2_install
fe4a31e
%endif
c947fb1
%py3_install
2c5e3a4
ecf6232
# Do not package the "tests"
fe4a31e
%if 0%{?with_py2}
870dd05
rm -rf %{buildroot}%{python2_sitelib}/tests/
fe4a31e
%endif
870dd05
rm -rf %{buildroot}%{python3_sitelib}/tests/
ecf6232
2c5e3a4
%check
93565c5
# Tests try to access the network, which doesn't work in koji.
93565c5
# export PYTHONPATH=$RPM_BUILD_ROOT/%%{python_sitelib}
3a50144
# %%{__python} setup.py test
2c5e3a4
fe4a31e
%if 0%{?with_py2}
c947fb1
%files -n python2-oauth2
ec9c9d5
%doc PKG-INFO
c947fb1
%{python2_sitelib}/*
fe4a31e
%endif
c947fb1
c947fb1
%files -n python3-oauth2
c947fb1
%doc PKG-INFO
c947fb1
%{python3_sitelib}/*
2c5e3a4
2c5e3a4
%changelog
2a844cb
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-31.post1
2a844cb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
2a844cb
58958dc
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-30.post1
58958dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
58958dc
116a0ba
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-29.post1
116a0ba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
116a0ba
7d63666
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1.9.0-28.post1
7d63666
- Rebuilt for Python 3.12
7d63666
b9fdab9
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-27.post1
b9fdab9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
b9fdab9
5a1e8a3
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-26.post1
5a1e8a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
5a1e8a3
c17d4d3
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.9.0-25.post1
c17d4d3
- Rebuilt for Python 3.11
c17d4d3
d8cb166
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-24.post1
d8cb166
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
d8cb166
ace1645
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-23.post1
ace1645
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
ace1645
812df8d
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.9.0-22.post1
812df8d
- Rebuilt for Python 3.10
812df8d
e4008de
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-21.post1
e4008de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
e4008de
cdc4a3c
* Sat Jan 02 2021 Miro Hrončok <mhroncok@redhat.com> - 1.9.0-20.post1
cdc4a3c
- Disable Python 2 on Fedora 34+ and RHEL 9+
cdc4a3c
b25be77
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-19.post1
b25be77
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
b25be77
341d884
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.9.0-18.post1
341d884
- Rebuilt for Python 3.9
341d884
fe4a31e
* Fri Jan 31 2020 Tom Callaway <spot@fedoraproject.org> - 1.9.0-17.post1
fe4a31e
- conditionalize python2 support (so we can shut it off easily when trac is modernized)
fe4a31e
- remove unnecessary (and dead) dependency on python2-simplejson
fe4a31e
e8c4a0a
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-16.post1
e8c4a0a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
e8c4a0a
6ea3c23
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.9.0-15.post1
6ea3c23
- Rebuilt for Python 3.8.0rc1 (#1748018)
6ea3c23
a84170a
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.9.0-14.post1
a84170a
- Rebuilt for Python 3.8
a84170a
927a4c6
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-13.post1
927a4c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
927a4c6
b277d90
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-12.post1
b277d90
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
b277d90
870dd05
* Tue Nov 27 2018 Athos Ribeiro <athoscr@fedoraproject.org> - 1.9.0-11.post1
870dd05
- Remove tests from python3 sitelib root
870dd05
8aeb4bf
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-10.post1
8aeb4bf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
8aeb4bf
abb3cc7
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.9.0-9.post1
abb3cc7
- Rebuilt for Python 3.7
abb3cc7
ba7ff2b
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-8.post1
ba7ff2b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ba7ff2b
46a3df5
* Fri Jan 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.9.0-7.post1
46a3df5
- Update Python 2 dependency declarations to new packaging standards
46a3df5
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
46a3df5
9773d2e
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-6.post1
9773d2e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9773d2e
d90781e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-5.post1
d90781e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d90781e
e3e0c58
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.9.0-4.post1
e3e0c58
- Rebuild for Python 3.6
e3e0c58
a51fe4c
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.0-3.post1
a51fe4c
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
a51fe4c
5c4a6f1
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-2.post1
5c4a6f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5c4a6f1
c947fb1
* Tue Nov 17 2015 Tom Callaway <spot@fedoraproject.org> - 1.9.0-1.post1
c947fb1
- update to 1.9.0.post1
c947fb1
- split into py2/py3
c947fb1
17493d7
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.211-9
17493d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
17493d7
5630cc4
* Wed Oct  8 2014 Tom Callaway <spot@fedoraproject.org> - 1.5.211-8
5630cc4
- actually apply patch to fix CVE-2013-4347 (thanks to Jason Green, Matt Wilson)
5630cc4
9e1ddf6
* Fri Sep 12 2014 Tom Callaway <spot@fedoraproject.org> - 1.5.211-7
9e1ddf6
- Fix CVE-2013-4346 and CVE-2013-4347 (thanks to Philippe Makowski)
9e1ddf6
ef4f1b9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.211-6
ef4f1b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ef4f1b9
13b0368
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.211-5
13b0368
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
13b0368
7a1aeb1
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.211-4
7a1aeb1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
7a1aeb1
b8fb5ed
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.211-3
b8fb5ed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b8fb5ed
ecf6232
* Mon Feb 27 2012 Tom Callaway <spot@fedoraproject.org> - 1.5.211-2
ecf6232
- do not package the "tests", resolves conflicts (bz797812)
ecf6232
dc3fb43
* Thu Feb 16 2012 Tom Callaway <spot@fedoraproject.org> - 1.5.211-1
dc3fb43
- update to 1.5.211
dc3fb43
- add multiple GET fix from Jason Connor (bz 784426)
dc3fb43
6312bab
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.170-3
6312bab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
6312bab
c6d90d2
* Wed Sep  7 2011 Tom Callaway <spot@fedoraproject.org> - 1.5.170-2
c6d90d2
- add Requires: python-httplib2 (bz736133)
c6d90d2
ec9c9d5
* Mon Jul 18 2011 Rahul Sundaram <sundaram@fedoraproject.org> - 1.5.170-1
ec9c9d5
- New upstream release
ec9c9d5
- Match current guidelines
ec9c9d5
655ed06
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
655ed06
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
655ed06
2c5e3a4
* Fri Oct 22 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 1.2.1-1
2c5e3a4
- Initial package for Fedora