]> git.pld-linux.org Git - packages/python-lazy-object-proxy.git/blob - python-lazy-object-proxy.spec
- python 3.6
[packages/python-lazy-object-proxy.git] / python-lazy-object-proxy.spec
1 #
2 # Conditional build:
3 %bcond_with     doc     # don't build doc
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 Name:           python-%{module}
10 Version:        1.2.1
11 Release:        2
12 License:        BSD
13 Group:          Libraries/Python
14 Source0:        https://pypi.python.org/packages/source/l/lazy-object-proxy/%{module}-%{version}.tar.gz
15 # Source0-md5:  ad33e3e06d24786f708b72cc23350afa
16 URL:            https://github.com/ionelmc/python-lazy-object-proxy
17 BuildRequires:  rpm-pythonprov
18 BuildRequires:  rpmbuild(macros) >= 1.714
19 %if %{with python2}
20 BuildRequires:  python-devel
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-devel
25 BuildRequires:  python3-setuptools
26 %endif
27 Requires:       python-modules
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 A fast and thorough lazy object proxy.
32
33 %package -n python3-%{module}
34 Summary:        A fast and thorough lazy object proxy
35 Group:          Libraries/Python
36 Requires:       python3-modules
37
38 %description -n python3-%{module}
39 A fast and thorough lazy object proxy.
40
41 %package apidocs
42 Summary:        %{module} API documentation
43 Summary(pl.UTF-8):      Dokumentacja API %{module}
44 Group:          Documentation
45
46 %description apidocs
47 API documentation for %{module}.
48
49 %description apidocs -l pl.UTF-8
50 Dokumentacja API %{module}.
51
52 %prep
53 %setup -q -n %{module}-%{version}
54
55 %build
56 %if %{with python2}
57 %py_build
58 %endif
59
60 %if %{with python3}
61 %py3_build
62 %endif
63
64 %if %{with doc}
65 sphinx-build -b html docs dist/docs
66 %endif
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70
71 %if %{with python2}
72 %py_install
73
74 %py_postclean
75
76 rm $RPM_BUILD_ROOT/%{py_sitedir}/lazy_object_proxy/*.c
77 %endif
78
79 %if %{with python3}
80 %py3_install
81
82 rm $RPM_BUILD_ROOT/%{py3_sitedir}/lazy_object_proxy/*.c
83 %endif
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %files
90 %defattr(644,root,root,755)
91 %doc *.rst
92 %dir %{py_sitedir}/lazy_object_proxy
93 %{py_sitedir}/lazy_object_proxy/*.py[co]
94 %attr(755,root,root) %{py_sitedir}/lazy_object_proxy/*.so
95 %{py_sitedir}/lazy_object_proxy-%{version}-py*.egg-info
96 %endif
97
98 %if %{with python3}
99 %files -n python3-%{module}
100 %defattr(644,root,root,755)
101 %doc *.rst
102 %dir %{py3_sitedir}/lazy_object_proxy
103 %{py3_sitedir}/lazy_object_proxy/*.py
104 %attr(755,root,root) %{py3_sitedir}/lazy_object_proxy/*.so
105 %{py3_sitedir}/lazy_object_proxy/__pycache__
106 %{py3_sitedir}/lazy_object_proxy-%{version}-py*.egg-info
107 %endif
108
109 %if %{with doc}
110 %files apidocs
111 %defattr(644,root,root,755)
112 %doc dist/docs/html/*
113 %endif
This page took 0.034167 seconds and 4 git commands to generate.