]>
Commit | Line | Data |
---|---|---|
1256c147 JK |
1 | # |
2 | # Conditional build: | |
747737d3 | 3 | %bcond_without doc # Sphinx documentation |
1256c147 | 4 | %bcond_without python2 # CPython 2.x module |
58a0e109 | 5 | %bcond_with python3 # CPython 3.x module (built from python3-lazy-object-proxy.spec) |
1256c147 JK |
6 | |
7 | %define module lazy-object-proxy | |
8 | Summary: A fast and thorough lazy object proxy | |
747737d3 | 9 | Summary(pl.UTF-8): Szybkie i gruntowne leniwe proxy obiektów |
1256c147 | 10 | Name: python-%{module} |
5e0884b7 JB |
11 | # keep 1.6.x here for python2 support |
12 | Version: 1.6.0 | |
cb57130d | 13 | Release: 4 |
1256c147 JK |
14 | License: BSD |
15 | Group: Libraries/Python | |
747737d3 JB |
16 | #Source0Download: https://pypi.org/simple/lazy-object-proxy/ |
17 | Source0: https://files.pythonhosted.org/packages/source/l/lazy-object-proxy/%{module}-%{version}.tar.gz | |
5e0884b7 | 18 | # Source0-md5: 0b99101615658aa711cb55c8db4930d5 |
1256c147 JK |
19 | URL: https://github.com/ionelmc/python-lazy-object-proxy |
20 | BuildRequires: rpm-pythonprov | |
21 | BuildRequires: rpmbuild(macros) >= 1.714 | |
22 | %if %{with python2} | |
747737d3 | 23 | BuildRequires: python-devel >= 1:2.7 |
9e6295ae | 24 | BuildRequires: python-setuptools >= 1:30.3.0 |
747737d3 | 25 | BuildRequires: python-setuptools_scm >= 3.3.1 |
1256c147 JK |
26 | %endif |
27 | %if %{with python3} | |
747737d3 | 28 | BuildRequires: python3-devel >= 1:3.4 |
9e6295ae | 29 | BuildRequires: python3-setuptools >= 1:30.3.0 |
747737d3 | 30 | BuildRequires: python3-setuptools_scm >= 3.3.1 |
1256c147 | 31 | %endif |
747737d3 | 32 | %if %{with doc} |
5e0884b7 JB |
33 | BuildRequires: python-sphinx_py3doc_enhanced_theme |
34 | BuildRequires: sphinx-pdg-2 >= 1.3 | |
747737d3 JB |
35 | %endif |
36 | Requires: python-modules >= 1:2.7 | |
1256c147 JK |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
38 | ||
39 | %description | |
40 | A fast and thorough lazy object proxy. | |
41 | ||
747737d3 JB |
42 | %description -l pl.UTF-8 |
43 | Szybkie i gruntowne leniwe proxy obiektów. | |
44 | ||
1256c147 JK |
45 | %package -n python3-%{module} |
46 | Summary: A fast and thorough lazy object proxy | |
747737d3 | 47 | Summary(pl.UTF-8): Szybkie i gruntowne leniwe proxy obiektów |
1256c147 | 48 | Group: Libraries/Python |
747737d3 | 49 | Requires: python3-modules >= 1:3.4 |
1256c147 JK |
50 | |
51 | %description -n python3-%{module} | |
52 | A fast and thorough lazy object proxy. | |
53 | ||
747737d3 JB |
54 | %description -n python3-%{module} -l pl.UTF-8 |
55 | Szybkie i gruntowne leniwe proxy obiektów. | |
56 | ||
1256c147 | 57 | %package apidocs |
747737d3 JB |
58 | Summary: API documentation for lazy_object_proxy module |
59 | Summary(pl.UTF-8): Dokumentacja API modułu lazy_object_proxy | |
1256c147 JK |
60 | Group: Documentation |
61 | ||
62 | %description apidocs | |
747737d3 | 63 | API documentation for lazy_object_proxy module. |
1256c147 JK |
64 | |
65 | %description apidocs -l pl.UTF-8 | |
747737d3 | 66 | Dokumentacja API modułu lazy_object_proxy. |
1256c147 JK |
67 | |
68 | %prep | |
69 | %setup -q -n %{module}-%{version} | |
70 | ||
71 | %build | |
72 | %if %{with python2} | |
73 | %py_build | |
74 | %endif | |
75 | ||
76 | %if %{with python3} | |
77 | %py3_build | |
78 | %endif | |
79 | ||
80 | %if %{with doc} | |
5e0884b7 | 81 | sphinx-build-2 -b html docs docs/_build |
1256c147 JK |
82 | %endif |
83 | ||
84 | %install | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %if %{with python2} | |
88 | %py_install | |
747737d3 | 89 | |
1256c147 | 90 | %py_postclean |
1256c147 JK |
91 | %endif |
92 | ||
93 | %if %{with python3} | |
94 | %py3_install | |
1256c147 JK |
95 | %endif |
96 | ||
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %if %{with python2} | |
101 | %files | |
102 | %defattr(644,root,root,755) | |
747737d3 | 103 | %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst |
1256c147 JK |
104 | %dir %{py_sitedir}/lazy_object_proxy |
105 | %{py_sitedir}/lazy_object_proxy/*.py[co] | |
747737d3 | 106 | %attr(755,root,root) %{py_sitedir}/lazy_object_proxy/cext.so |
1256c147 JK |
107 | %{py_sitedir}/lazy_object_proxy-%{version}-py*.egg-info |
108 | %endif | |
109 | ||
110 | %if %{with python3} | |
111 | %files -n python3-%{module} | |
112 | %defattr(644,root,root,755) | |
747737d3 | 113 | %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst |
1256c147 JK |
114 | %dir %{py3_sitedir}/lazy_object_proxy |
115 | %{py3_sitedir}/lazy_object_proxy/*.py | |
747737d3 | 116 | %attr(755,root,root) %{py3_sitedir}/lazy_object_proxy/cext.cpython-*.so |
1256c147 JK |
117 | %{py3_sitedir}/lazy_object_proxy/__pycache__ |
118 | %{py3_sitedir}/lazy_object_proxy-%{version}-py*.egg-info | |
119 | %endif | |
120 | ||
121 | %if %{with doc} | |
122 | %files apidocs | |
123 | %defattr(644,root,root,755) | |
747737d3 | 124 | %doc docs/_build/{_static,*.html,*.js} |
1256c147 | 125 | %endif |