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