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