2 %bcond_without python2 # build python 2 module
3 %bcond_without python3 # build python 3 module
5 %define module oauthlib
6 Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
11 Group: Development/Languages/Python
12 Source0: https://pypi.python.org/packages/source/o/oauthlib/%{module}-%{version}.tar.gz
13 # Source0-md5: 1fca21cda1c106ff4c5110cc355dca22
14 URL: https://pypi.python.org/pypi/oauthlib
16 BuildRequires: python-setuptools
17 BuildRequires: python-modules >= 1:2.6
20 BuildRequires: python3-setuptools
21 BuildRequires: python3-modules >= 3.2
23 BuildRequires: rpm-pythonprov
24 BuildRequires: rpmbuild(macros) >= 1.710
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 OAuthLib is a generic utility which implements the logic of OAuth
30 without assuming a specific HTTP request object. Use it to graft OAuth
31 support onto your favorite HTTP library. If you're a maintainer of
32 such a library, write a thin veneer on top of OAuthLib and get OAuth
33 support for very little effort.
35 %package -n python3-oauthlib
36 Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
37 Group: Development/Languages/Python
39 %description -n python3-oauthlib
40 OAuthLib is a generic utility which implements the logic of OAuth
41 without assuming a specific HTTP request object. Use it to graft OAuth
42 support onto your favorite HTTP library. If you're a maintainer of
43 such a library, write a thin veneer on top of OAuthLib and get OAuth
44 support for very little effort.
47 %setup -q -n %{module}-%{version}
59 rm -rf $RPM_BUILD_ROOT
63 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
64 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
73 rm -rf $RPM_BUILD_ROOT
77 %defattr(644,root,root,755)
78 %doc README.rst CHANGELOG.rst
79 %{py_sitescriptdir}/%{module}
80 %if "%{py_ver}" > "2.4"
81 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
86 %files -n python3-oauthlib
87 %defattr(644,root,root,755)
88 %doc README.rst CHANGELOG.rst
89 %{py3_sitescriptdir}/%{module}
90 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info