]>
Commit | Line | Data |
---|---|---|
e56bceb6 | 1 | # |
ed0588c6 | 2 | # Conditional build: |
e56bceb6 JB |
3 | %bcond_without tests # unit tests |
4 | %bcond_without python2 # build python 2 module | |
5 | %bcond_without python3 # build python 3 module | |
ed0588c6 | 6 | # |
fd8b22ee | 7 | %define module oauthlib |
ed0588c6 | 8 | Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic |
e56bceb6 | 9 | Summary(pl.UTF-8): Ogólna, zgodna ze specyfikacją, pełna implementacja logiki podpisywania żądań OAuth |
ed0588c6 | 10 | Name: python-%{module} |
e56bceb6 | 11 | Version: 3.1.0 |
2d8f8024 | 12 | Release: 2 |
ed0588c6 JK |
13 | License: BSD |
14 | Group: Development/Languages/Python | |
e56bceb6 JB |
15 | #Source0Download: https://pypi.org/simple/oauthlib/ |
16 | Source0: https://files.pythonhosted.org/packages/source/o/oauthlib/%{module}-%{version}.tar.gz | |
17 | # Source0-md5: 43cb2b5bac983712ee55076b61181cc2 | |
18 | Patch0: %{name}-mock.patch | |
19 | URL: https://pypi.org/project/oauthlib/ | |
ed0588c6 | 20 | %if %{with python2} |
e56bceb6 | 21 | BuildRequires: python-modules >= 1:2.7 |
bf1397ad | 22 | BuildRequires: python-setuptools |
e56bceb6 JB |
23 | %if %{with tests} |
24 | BuildRequires: python-blinker | |
25 | BuildRequires: python-cryptography | |
26 | BuildRequires: python-mock | |
27 | BuildRequires: python-nose | |
28 | BuildRequires: python-pyjwt >= 1.0.0 | |
29 | %endif | |
ed0588c6 JK |
30 | %endif |
31 | %if %{with python3} | |
e56bceb6 | 32 | BuildRequires: python3-modules >= 1:3.4 |
bf1397ad | 33 | BuildRequires: python3-setuptools |
e56bceb6 JB |
34 | %if %{with tests} |
35 | BuildRequires: python3-blinker | |
36 | BuildRequires: python3-cryptography | |
37 | BuildRequires: python3-nose | |
38 | BuildRequires: python3-pyjwt >= 1.0.0 | |
39 | %endif | |
ed0588c6 JK |
40 | %endif |
41 | BuildRequires: rpm-pythonprov | |
e56bceb6 | 42 | BuildRequires: rpmbuild(macros) >= 1.714 |
ed0588c6 JK |
43 | BuildArch: noarch |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %description | |
47 | OAuthLib is a generic utility which implements the logic of OAuth | |
48 | without assuming a specific HTTP request object. Use it to graft OAuth | |
49 | support onto your favorite HTTP library. If you're a maintainer of | |
50 | such a library, write a thin veneer on top of OAuthLib and get OAuth | |
51 | support for very little effort. | |
52 | ||
e56bceb6 JB |
53 | %description -l pl.UTF-8 |
54 | OAuthLib to ogólne narzędzie implementujące logikę OAuth bez | |
55 | zakładania określonych obiektów żądań HTTP. Można go użyć do dołożenia | |
56 | obsługi OAuth do ulubionej biblioteki HTTP. Będąc utrzymującym taką | |
57 | bibliotekę wystarczy napisać cienką warstwę powyżej OAuthLib, aby | |
58 | uzyskać obsługę OAuth niskim kosztem. | |
59 | ||
ed0588c6 JK |
60 | %package -n python3-oauthlib |
61 | Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic | |
e56bceb6 | 62 | Summary(pl.UTF-8): Ogólna, zgodna ze specyfikacją, pełna implementacja logiki podpisywania żądań OAuth |
ed0588c6 JK |
63 | Group: Development/Languages/Python |
64 | ||
65 | %description -n python3-oauthlib | |
66 | OAuthLib is a generic utility which implements the logic of OAuth | |
67 | without assuming a specific HTTP request object. Use it to graft OAuth | |
68 | support onto your favorite HTTP library. If you're a maintainer of | |
69 | such a library, write a thin veneer on top of OAuthLib and get OAuth | |
70 | support for very little effort. | |
71 | ||
e56bceb6 JB |
72 | %description -n python3-oauthlib -l pl.UTF-8 |
73 | OAuthLib to ogólne narzędzie implementujące logikę OAuth bez | |
74 | zakładania określonych obiektów żądań HTTP. Można go użyć do dołożenia | |
75 | obsługi OAuth do ulubionej biblioteki HTTP. Będąc utrzymującym taką | |
76 | bibliotekę wystarczy napisać cienką warstwę powyżej OAuthLib, aby | |
77 | uzyskać obsługę OAuth niskim kosztem. | |
78 | ||
ed0588c6 JK |
79 | %prep |
80 | %setup -q -n %{module}-%{version} | |
e56bceb6 | 81 | %patch0 -p1 |
ed0588c6 JK |
82 | |
83 | %build | |
84 | %if %{with python2} | |
fd8b22ee | 85 | %py_build |
e56bceb6 JB |
86 | |
87 | %if %{with tests} | |
88 | nosetests-%{py_ver} tests | |
89 | %endif | |
ed0588c6 JK |
90 | %endif |
91 | ||
92 | %if %{with python3} | |
fd8b22ee | 93 | %py3_build |
e56bceb6 JB |
94 | |
95 | %if %{with tests} | |
96 | nosetests-%{py3_ver} tests | |
97 | %endif | |
ed0588c6 JK |
98 | %endif |
99 | ||
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
103 | %if %{with python2} | |
fd8b22ee | 104 | %py_install |
e56bceb6 | 105 | |
ed0588c6 JK |
106 | %py_postclean |
107 | %endif | |
108 | ||
109 | %if %{with python3} | |
fd8b22ee | 110 | %py3_install |
ed0588c6 JK |
111 | %endif |
112 | ||
ed0588c6 JK |
113 | %clean |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %if %{with python2} | |
117 | %files | |
118 | %defattr(644,root,root,755) | |
e56bceb6 | 119 | %doc CHANGELOG.rst LICENSE README.rst |
ed0588c6 | 120 | %{py_sitescriptdir}/%{module} |
ed0588c6 JK |
121 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info |
122 | %endif | |
ed0588c6 JK |
123 | |
124 | %if %{with python3} | |
125 | %files -n python3-oauthlib | |
126 | %defattr(644,root,root,755) | |
e56bceb6 | 127 | %doc CHANGELOG.rst LICENSE README.rst |
ed0588c6 JK |
128 | %{py3_sitescriptdir}/%{module} |
129 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
130 | %endif |