]> git.pld-linux.org Git - packages/python-rauth.git/blob - python-rauth.spec
rebuild with python 3.10
[packages/python-rauth.git] / python-rauth.spec
1 #
2 # Conditional build:
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
7
8 %define         module  rauth
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}
12 Version:        0.7.1
13 Release:        8
14 License:        MIT
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
21 %if %{with python2}
22 BuildRequires:  python-modules
23 BuildRequires:  python-setuptools >= 1:7.0
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules
27 BuildRequires:  python3-setuptools >= 1:7.0
28 %endif
29 Requires:       python-modules
30 Requires:       python-requests >= 1.2.3
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 OAuth 1.0/a, OAuth 2.0, and Ofly library.
36
37 %description -l pl.UTF-8
38 Biblioteka OAuth 1.0/a, OAuth 2.0 oraz Ofly.
39
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
46
47 %description -n python3-%{module}
48 OAuth 1.0/a, OAuth 2.0, and Ofly library.
49
50 %description -n python3-%{module} -l pl.UTF-8
51 Biblioteka OAuth 1.0/a, OAuth 2.0 oraz Ofly.
52
53 %package apidocs
54 Summary:        %{module} API documentation
55 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona %{module}
56 Group:          Documentation
57
58 %description apidocs
59 API documentation for %{module}.
60
61 %description apidocs -l pl.UTF-8
62 Dokumentacja API modułu Pythona %{module}.
63
64 %prep
65 %setup -q -n %{module}-%{version}
66
67 %build
68 %if %{with python2}
69 %py_build %{?with_tests:test}
70 %endif
71
72 %if %{with python3}
73 %py3_build %{?with_tests:test}
74 %endif
75
76 %if %{with doc}
77 cd docs
78 %{__make} -j1 html
79 rm -rf _build/html/_sources
80 %endif
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84 %if %{with python2}
85 %py_install
86
87 %py_postclean
88 %endif
89
90 %if %{with python3}
91 %py3_install
92 %endif
93
94 %clean
95 rm -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}
102 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
103 %endif
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.129086 seconds and 3 git commands to generate.