3 %bcond_with doc # Sphinx documentation
4 %bcond_with tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
9 Summary: OAuth 1.0/a, OAuth 2.0, and Ofly library
10 Summary(pl.UTF-8): Biblioteka OAuth 1.0/a, OAuth 2.0 oraz Ofly
11 Name: python-%{module}
15 Group: Libraries/Python
16 Source0: https://github.com/litl/rauth/archive/%{version}.tar.gz
17 # Source0-md5: b7cb31e288ce24d0be788595e3685253
18 URL: https://github.com/litl/rauth
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules
23 BuildRequires: python-setuptools >= 1:7.0
26 BuildRequires: python3-modules
27 BuildRequires: python3-setuptools >= 1:7.0
29 Requires: python-modules
30 Requires: python-requests >= 1.2.3
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 OAuth 1.0/a, OAuth 2.0, and Ofly library.
37 %description -l pl.UTF-8
38 Biblioteka OAuth 1.0/a, OAuth 2.0 oraz Ofly.
40 %package -n python3-%{module}
41 Summary: OAuth 1.0/a, OAuth 2.0, and Ofly library
42 Summary(pl.UTF-8): Biblioteka OAuth 1.0/a, OAuth 2.0 oraz Ofly
43 Group: Libraries/Python
44 Requires: python3-modules
45 Requires: python3-requests >= 1.2.3
47 %description -n python3-%{module}
48 OAuth 1.0/a, OAuth 2.0, and Ofly library.
50 %description -n python3-%{module} -l pl.UTF-8
51 Biblioteka OAuth 1.0/a, OAuth 2.0 oraz Ofly.
54 Summary: %{module} API documentation
55 Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
59 API documentation for %{module}.
61 %description apidocs -l pl.UTF-8
62 Dokumentacja API modułu Pythona %{module}.
65 %setup -q -n %{module}-%{version}
69 %py_build %{?with_tests:test}
73 %py3_build %{?with_tests:test}
79 rm -rf _build/html/_sources
83 rm -rf $RPM_BUILD_ROOT
95 rm -rf $RPM_BUILD_ROOT
99 %defattr(644,root,root,755)
100 %doc AUTHORS.md CHANGELOG README.md
101 %{py_sitescriptdir}/%{module}
102 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
106 %files -n python3-%{module}
107 %defattr(644,root,root,755)
108 %doc AUTHORS.md CHANGELOG README.md
109 %{py3_sitescriptdir}/%{module}
110 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
115 %defattr(644,root,root,755)
116 %doc docs/_build/html/*