]> git.pld-linux.org Git - packages/python-lazy-object-proxy.git/blob - python-lazy-object-proxy.spec
8eb7426c2d4c1ae717fbe871802cf81065268c0e
[packages/python-lazy-object-proxy.git] / python-lazy-object-proxy.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  lazy-object-proxy
8 Summary:        A fast and thorough lazy object proxy
9 Summary(pl.UTF-8):      Szybkie i gruntowne leniwe proxy obiektów
10 Name:           python-%{module}
11 # keep 1.6.x here for python2 support
12 Version:        1.6.0
13 Release:        4
14 License:        BSD
15 Group:          Libraries/Python
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
18 # Source0-md5:  0b99101615658aa711cb55c8db4930d5
19 URL:            https://github.com/ionelmc/python-lazy-object-proxy
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 %if %{with python2}
23 BuildRequires:  python-devel >= 1:2.7
24 BuildRequires:  python-setuptools >= 1:30.3.0
25 BuildRequires:  python-setuptools_scm >= 3.3.1
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-devel >= 1:3.4
29 BuildRequires:  python3-setuptools >= 1:30.3.0
30 BuildRequires:  python3-setuptools_scm >= 3.3.1
31 %endif
32 %if %{with doc}
33 BuildRequires:  python-sphinx_py3doc_enhanced_theme
34 BuildRequires:  sphinx-pdg-2 >= 1.3
35 %endif
36 Requires:       python-modules >= 1:2.7
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 A fast and thorough lazy object proxy.
41
42 %description -l pl.UTF-8
43 Szybkie i gruntowne leniwe proxy obiektów.
44
45 %package -n python3-%{module}
46 Summary:        A fast and thorough lazy object proxy
47 Summary(pl.UTF-8):      Szybkie i gruntowne leniwe proxy obiektów
48 Group:          Libraries/Python
49 Requires:       python3-modules >= 1:3.4
50
51 %description -n python3-%{module}
52 A fast and thorough lazy object proxy.
53
54 %description -n python3-%{module} -l pl.UTF-8
55 Szybkie i gruntowne leniwe proxy obiektów.
56
57 %package apidocs
58 Summary:        API documentation for lazy_object_proxy module
59 Summary(pl.UTF-8):      Dokumentacja API modułu lazy_object_proxy
60 Group:          Documentation
61
62 %description apidocs
63 API documentation for lazy_object_proxy module.
64
65 %description apidocs -l pl.UTF-8
66 Dokumentacja API modułu lazy_object_proxy.
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}
81 sphinx-build-2 -b html docs docs/_build
82 %endif
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python2}
88 %py_install
89
90 %py_postclean
91 %endif
92
93 %if %{with python3}
94 %py3_install
95 %endif
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with python2}
101 %files
102 %defattr(644,root,root,755)
103 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
104 %dir %{py_sitedir}/lazy_object_proxy
105 %{py_sitedir}/lazy_object_proxy/*.py[co]
106 %attr(755,root,root) %{py_sitedir}/lazy_object_proxy/cext.so
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)
113 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
114 %dir %{py3_sitedir}/lazy_object_proxy
115 %{py3_sitedir}/lazy_object_proxy/*.py
116 %attr(755,root,root) %{py3_sitedir}/lazy_object_proxy/cext.cpython-*.so
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)
124 %doc docs/_build/{_static,*.html,*.js}
125 %endif
This page took 0.117945 seconds and 2 git commands to generate.