]> git.pld-linux.org Git - packages/python-rauth.git/blame - python-rauth.spec
- python 3.6
[packages/python-rauth.git] / python-rauth.spec
CommitLineData
58028b39
AM
1#
2# Conditional build:
3%bcond_with doc # don't build doc
4%bcond_with tests # do not perform "make test"
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module rauth
9Summary: OAuth 1.0/a, OAuth 2.0, and Ofly library
10Name: python-%{module}
11Version: 0.7.1
459e5b99 12Release: 4
9558fe37 13License: MIT
58028b39
AM
14Group: Libraries/Python
15Source0: https://github.com/litl/rauth/archive/%{version}.tar.gz
16# Source0-md5: b7cb31e288ce24d0be788595e3685253
9558fe37 17URL: https://github.com/litl/rauth
58028b39 18BuildRequires: rpm-pythonprov
6736b751 19BuildRequires: rpmbuild(macros) >= 1.710
58028b39 20%if %{with python2}
9558fe37 21BuildRequires: python-modules
58028b39
AM
22BuildRequires: python-setuptools >= 7.0
23%endif
24%if %{with python3}
58028b39
AM
25BuildRequires: python3-modules
26BuildRequires: python3-setuptools >= 7.0
27%endif
28Requires: python-modules
b051b9f5 29Requires: python-requests >= 1.2.3
58028b39
AM
30BuildArch: noarch
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34OAuth 1.0/a, OAuth 2.0, and Ofly library.
35
36%package -n python3-%{module}
37Summary: OAuth 1.0/a, OAuth 2.0, and Ofly library
38Group: Libraries/Python
39Requires: python3-modules
b051b9f5 40Requires: python3-requests >= 1.2.3
58028b39
AM
41
42%description -n python3-%{module}
43OAuth 1.0/a, OAuth 2.0, and Ofly library.
44
45%package apidocs
46Summary: %{module} API documentation
47Summary(pl.UTF-8): Dokumentacja API %{module}
48Group: Documentation
49
50%description apidocs
51API documentation for %{module}.
52
53%description apidocs -l pl.UTF-8
54Dokumentacja API %{module}.
55
56%prep
57%setup -q -n %{module}-%{version}
58
58028b39
AM
59%build
60%if %{with python2}
28c17e1c 61%py_build %{?with_tests:test}
58028b39
AM
62%endif
63
64%if %{with python3}
28c17e1c 65%py3_build %{?with_tests:test}
58028b39
AM
66%endif
67
68%if %{with doc}
69cd docs
70%{__make} -j1 html
71rm -rf _build/html/_sources
72%endif
73
74%install
75rm -rf $RPM_BUILD_ROOT
58028b39 76%if %{with python2}
28c17e1c 77%py_install
58028b39
AM
78
79%py_postclean
80%endif
81
82%if %{with python3}
28c17e1c 83%py3_install
58028b39
AM
84%endif
85
86%clean
87rm -rf $RPM_BUILD_ROOT
88
89%if %{with python2}
90%files
91%defattr(644,root,root,755)
92%doc AUTHORS.md CHANGELOG README.md
93%{py_sitescriptdir}/%{module}
58028b39
AM
94%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
95%endif
58028b39
AM
96
97%if %{with python3}
98%files -n python3-%{module}
99%defattr(644,root,root,755)
100%doc AUTHORS.md CHANGELOG README.md
101%{py3_sitescriptdir}/%{module}
102%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
103%endif
104
105%if %{with doc}
106%files apidocs
107%defattr(644,root,root,755)
108%doc docs/_build/html/*
109%endif
This page took 0.13338 seconds and 4 git commands to generate.