]> git.pld-linux.org Git - packages/python-rauth.git/blob - python-rauth.spec
- rebuild with python 3.8
[packages/python-rauth.git] / python-rauth.spec
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
9 Summary:        OAuth 1.0/a, OAuth 2.0, and Ofly library
10 Name:           python-%{module}
11 Version:        0.7.1
12 Release:        6
13 License:        MIT
14 Group:          Libraries/Python
15 Source0:        https://github.com/litl/rauth/archive/%{version}.tar.gz
16 # Source0-md5:  b7cb31e288ce24d0be788595e3685253
17 URL:            https://github.com/litl/rauth
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.710
20 %if %{with python2}
21 BuildRequires:  python-modules
22 BuildRequires:  python-setuptools >= 7.0
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-modules
26 BuildRequires:  python3-setuptools >= 7.0
27 %endif
28 Requires:       python-modules
29 Requires:       python-requests >= 1.2.3
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 OAuth 1.0/a, OAuth 2.0, and Ofly library.
35
36 %package -n python3-%{module}
37 Summary:        OAuth 1.0/a, OAuth 2.0, and Ofly library
38 Group:          Libraries/Python
39 Requires:       python3-modules
40 Requires:       python3-requests >= 1.2.3
41
42 %description -n python3-%{module}
43 OAuth 1.0/a, OAuth 2.0, and Ofly library.
44
45 %package apidocs
46 Summary:        %{module} API documentation
47 Summary(pl.UTF-8):      Dokumentacja API %{module}
48 Group:          Documentation
49
50 %description apidocs
51 API documentation for %{module}.
52
53 %description apidocs -l pl.UTF-8
54 Dokumentacja API %{module}.
55
56 %prep
57 %setup -q -n %{module}-%{version}
58
59 %build
60 %if %{with python2}
61 %py_build %{?with_tests:test}
62 %endif
63
64 %if %{with python3}
65 %py3_build %{?with_tests:test}
66 %endif
67
68 %if %{with doc}
69 cd docs
70 %{__make} -j1 html
71 rm -rf _build/html/_sources
72 %endif
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 %if %{with python2}
77 %py_install
78
79 %py_postclean
80 %endif
81
82 %if %{with python3}
83 %py3_install
84 %endif
85
86 %clean
87 rm -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}
94 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
95 %endif
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.125838 seconds and 3 git commands to generate.