]>
Commit | Line | Data |
---|---|---|
ed0588c6 JK |
1 | # Conditional build: |
2 | %bcond_without python2 # build python 2 module | |
3 | %bcond_without python3 # build python 3 module | |
4 | # | |
fd8b22ee | 5 | %define module oauthlib |
ed0588c6 JK |
6 | Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic |
7 | Name: python-%{module} | |
bf1397ad | 8 | Version: 2.0.7 |
decab7a0 | 9 | Release: 2 |
ed0588c6 JK |
10 | License: BSD |
11 | Group: Development/Languages/Python | |
12 | Source0: https://pypi.python.org/packages/source/o/oauthlib/%{module}-%{version}.tar.gz | |
bf1397ad | 13 | # Source0-md5: 1fca21cda1c106ff4c5110cc355dca22 |
ed0588c6 JK |
14 | URL: https://pypi.python.org/pypi/oauthlib |
15 | %if %{with python2} | |
bf1397ad | 16 | BuildRequires: python-setuptools |
ed0588c6 JK |
17 | BuildRequires: python-modules >= 1:2.6 |
18 | %endif | |
19 | %if %{with python3} | |
bf1397ad | 20 | BuildRequires: python3-setuptools |
5cae27c9 | 21 | BuildRequires: python3-modules >= 1:3.2 |
ed0588c6 JK |
22 | %endif |
23 | BuildRequires: rpm-pythonprov | |
c74b3761 | 24 | BuildRequires: rpmbuild(macros) >= 1.710 |
ed0588c6 JK |
25 | BuildArch: noarch |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
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. | |
34 | ||
35 | %package -n python3-oauthlib | |
36 | Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic | |
37 | Group: Development/Languages/Python | |
38 | ||
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. | |
45 | ||
46 | %prep | |
47 | %setup -q -n %{module}-%{version} | |
48 | ||
49 | %build | |
50 | %if %{with python2} | |
fd8b22ee | 51 | %py_build |
ed0588c6 JK |
52 | %endif |
53 | ||
54 | %if %{with python3} | |
fd8b22ee | 55 | %py3_build |
ed0588c6 JK |
56 | %endif |
57 | ||
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %if %{with python2} | |
fd8b22ee | 62 | %py_install |
ed0588c6 JK |
63 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} |
64 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
65 | %py_postclean | |
66 | %endif | |
67 | ||
68 | %if %{with python3} | |
fd8b22ee | 69 | %py3_install |
ed0588c6 JK |
70 | %endif |
71 | ||
ed0588c6 JK |
72 | %clean |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %if %{with python2} | |
76 | %files | |
77 | %defattr(644,root,root,755) | |
bf1397ad | 78 | %doc README.rst CHANGELOG.rst |
ed0588c6 JK |
79 | %{py_sitescriptdir}/%{module} |
80 | %if "%{py_ver}" > "2.4" | |
81 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
82 | %endif | |
83 | %endif | |
84 | ||
85 | %if %{with python3} | |
86 | %files -n python3-oauthlib | |
87 | %defattr(644,root,root,755) | |
bf1397ad | 88 | %doc README.rst CHANGELOG.rst |
ed0588c6 JK |
89 | %{py3_sitescriptdir}/%{module} |
90 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
91 | %endif |