]> git.pld-linux.org Git - packages/python-requests-oauthlib.git/blame - python-requests-oauthlib.spec
- release 2 (by relup.sh)
[packages/python-requests-oauthlib.git] / python-requests-oauthlib.spec
CommitLineData
ed4c108b 1#
a6a43135 2# Conditional build:
ed4c108b
JB
3%bcond_without doc # API documentation
4%bcond_without tests # unit tests
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
c86c504e 7
6a83a707
ER
8%define module requests_oauthlib
9%define egg_name requests_oauthlib
10%define pypi_name requests-oauthlib
ed4c108b
JB
11Summary: OAuthlib authentication support for Requests
12Summary(pl.UTF-8): Obsługa uwierzytelniania przez OAuthlib dla Requests
6a83a707 13Name: python-%{pypi_name}
ed4c108b 14Version: 1.3.0
1db4b650 15Release: 2
a6a43135
JK
16License: ISC
17Group: Development/Languages/Python
ed4c108b
JB
18#Source0Download: https://pypi.org/simple/requests-oauthlib/
19Source0: https://files.pythonhosted.org/packages/source/r/requests-oauthlib/%{pypi_name}-%{version}.tar.gz
20# Source0-md5: 1ebcd55f1b1b9281940b4bc33010e2ba
a6a43135
JK
21URL: https://github.com/requests/requests-oauthlib
22%if %{with python2}
ed4c108b 23BuildRequires: python-modules >= 1:2.7
87fa7a06 24BuildRequires: python-setuptools
ed4c108b
JB
25%if %{with tests}
26BuildRequires: python-cryptography
27BuildRequires: python-mock
28BuildRequires: python-oauthlib >= 3.0.0
29BuildRequires: python-pyjwt >= 1.0.0
30BuildRequires: python-requests >= 2.0.0
31BuildRequires: python-requests-mock
32%endif
a6a43135
JK
33%endif
34%if %{with python3}
ed4c108b 35BuildRequires: python3-modules >= 1:3.4
87fa7a06 36BuildRequires: python3-setuptools
ed4c108b
JB
37%if %{with tests}
38BuildRequires: python3-cryptography
39BuildRequires: python3-oauthlib >= 3.0.0
40BuildRequires: python3-pyjwt >= 1.0.0
41BuildRequires: python3-requests >= 2.0.0
42BuildRequires: python3-requests-mock
43%endif
a6a43135
JK
44%endif
45BuildRequires: rpm-pythonprov
ed4c108b
JB
46BuildRequires: rpmbuild(macros) >= 1.714
47%{?with_doc:BuildRequires: sphinx-pdg}
48Requires: python-modules >= 1:2.7
6a83a707 49Obsoletes: python-requests_oauthlib < 0.6.1-3
a6a43135
JK
50BuildArch: noarch
51BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53%description
ed4c108b
JB
54This project provides first-class OAuth library support for Requests.
55
56%description -l pl.UTF-8
57Ten pakiet zapewnia obsługę biblioteki OAuth dla Requests.
a6a43135 58
6a83a707 59%package -n python3-%{pypi_name}
ed4c108b
JB
60Summary: OAuthlib authentication support for Requests
61Summary(pl.UTF-8): Obsługa uwierzytelniania przez OAuthlib dla Requests
a6a43135 62Group: Development/Languages/Python
ed4c108b 63Requires: python3-modules >= 1:3.4
6a83a707 64Obsoletes: python3-requests_oauthlib < 0.6.1-3
a6a43135 65
6a83a707 66%description -n python3-%{pypi_name}
ed4c108b
JB
67This project provides first-class OAuth library support for Requests.
68
69%description -n python3-%{pypi_name} -l pl.UTF-8
70Ten pakiet zapewnia obsługę biblioteki OAuth dla Requests.
71
72%package apidocs
73Summary: API documentation for requests-oauthlib module
74Summary(pl.UTF-8): Dokumentacja API biblioteki requests-oauthlib
75Group: Documentation
76
77%description apidocs
78API documentation for requests-oauthlib module.
79
80%description apidocs -l pl.UTF-8
81Dokumentacja API biblioteki requests-oauthlib.
a6a43135
JK
82
83%prep
6a83a707 84%setup -q -n %{pypi_name}-%{version}
a6a43135
JK
85
86%build
87%if %{with python2}
4d7e4299 88%py_build
ed4c108b
JB
89
90%if %{with tests}
91%{__python} -m unittest discover -s tests
92%endif
a6a43135
JK
93%endif
94
95%if %{with python3}
4d7e4299 96%py3_build
ed4c108b
JB
97
98%if %{with tests}
99%{__python3} -m unittest discover -s tests
100%endif
101%endif
102
103%if %{with doc}
104%{__make} -C docs html
a6a43135
JK
105%endif
106
107%install
108rm -rf $RPM_BUILD_ROOT
ed4c108b 109
a6a43135 110%if %{with python2}
4d7e4299 111%py_install
ed4c108b 112
a6a43135
JK
113%py_postclean
114%endif
115
116%if %{with python3}
4d7e4299 117%py3_install
a6a43135
JK
118%endif
119
a6a43135
JK
120%clean
121rm -rf $RPM_BUILD_ROOT
122
123%if %{with python2}
124%files
125%defattr(644,root,root,755)
ed4c108b 126%doc AUTHORS.rst HISTORY.rst LICENSE README.rst
a6a43135 127%{py_sitescriptdir}/%{module}
6a83a707 128%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
a6a43135
JK
129%endif
130
131%if %{with python3}
6a83a707 132%files -n python3-%{pypi_name}
a6a43135 133%defattr(644,root,root,755)
ed4c108b 134%doc AUTHORS.rst HISTORY.rst LICENSE README.rst
a6a43135 135%{py3_sitescriptdir}/%{module}
6a83a707 136%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
a6a43135 137%endif
ed4c108b
JB
138
139%if %{with doc}
140%files apidocs
141%defattr(644,root,root,755)
142%doc docs/_build/html/{_static,examples,*.html,*.js}
143%endif
This page took 0.880281 seconds and 4 git commands to generate.