]>
Commit | Line | Data |
---|---|---|
d5ca9cfd MK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with doc # don't build doc | |
4 | %bcond_without 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 blist | |
9 | Summary: The blist is a drop-in replacement for the Python list that provides better performance when modifying large lists | |
10 | Summary(pl.UTF-8): Blist jest zamiennikiem dla Pythonowych list który jest szybszy przy modifikacjach dużych list | |
11 | Name: python-%{module} | |
12 | Version: 1.3.6 | |
d30b2056 | 13 | Release: 9 |
d5ca9cfd MK |
14 | License: BSD |
15 | Group: Libraries/Python | |
16 | Source0: http://pypi.python.org/packages/source/b/%{module}/%{module}-%{version}.tar.gz | |
17 | # Source0-md5: a538f1a24b9191e3c40252e9397408a9 | |
18 | URL: http://stutzbachenterprises.com/blist/ | |
19 | BuildRequires: rpm-pythonprov | |
20 | # if py_postclean is used | |
cd7b9fa4 | 21 | BuildRequires: rpmbuild(macros) >= 1.710 |
d5ca9cfd MK |
22 | %if %{with python2} |
23 | BuildRequires: python-devel | |
24 | BuildRequires: python-distribute | |
25 | %endif | |
26 | %if %{with python3} | |
27 | BuildRequires: python3-devel | |
d5ca9cfd MK |
28 | BuildRequires: python3-modules |
29 | %endif | |
30 | Requires: python-modules | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
34 | The blist is a drop-in replacement for the Python list that provides better performance when modifying large lists. | |
35 | The blist package also provides sortedlist, sortedset, weaksortedlist, weaksortedset, sorteddict, and btuple types | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | Blist jest zamiennikiem dla Pythonowych list który jest szybszy przy modifikacjach dużych list. | |
39 | Pakiet blist udostępnia też typy: sortedlist, sortedset, weaksortedlist, weaksortedset, sorteddict, and btuple. | |
40 | ||
41 | %package -n python3-%{module} | |
42 | Summary: - | |
43 | Summary(pl.UTF-8): - | |
44 | Group: Libraries/Python | |
45 | Requires: python3-modules | |
46 | ||
47 | %description -n python3-%{module} | |
48 | The blist is a drop-in replacement for the Python list that provides better performance when modifying large lists | |
49 | ||
50 | %description -n python3-%{module} -l pl.UTF-8 | |
51 | Blist jest zamiennikiem dla Pythonowych list który jest szybszy przy modifikacjach dużych list. | |
52 | Pakiet blist udostępnia też typy: sortedlist, sortedset, weaksortedlist, weaksortedset, sorteddict, and btuple. | |
53 | ||
54 | %package apidocs | |
55 | Summary: %{module} API documentation | |
56 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
57 | Group: Documentation | |
58 | ||
59 | %description apidocs | |
60 | API documentation for %{module}. | |
61 | ||
62 | %description apidocs -l pl.UTF-8 | |
63 | Dokumentacja API %{module}. | |
64 | ||
65 | %prep | |
66 | %setup -q -n %{module}-%{version} | |
67 | ||
68 | %build | |
69 | %if %{with python2} | |
1306d80a | 70 | %py_build %{?with_tests:test} |
d5ca9cfd MK |
71 | %endif |
72 | ||
73 | %if %{with python3} | |
1306d80a | 74 | %py3_build %{?with_tests:test} |
d5ca9cfd MK |
75 | %endif |
76 | ||
77 | %if %{with doc} | |
78 | cd docs | |
79 | %{__make} -j1 html | |
80 | rm -rf _build/html/_sources | |
81 | %endif | |
82 | ||
83 | %install | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
86 | %if %{with python2} | |
1306d80a | 87 | %py_install |
d5ca9cfd MK |
88 | |
89 | %py_postclean | |
90 | %endif | |
91 | ||
92 | %if %{with python3} | |
1306d80a | 93 | %py3_install |
d5ca9cfd MK |
94 | %endif |
95 | ||
96 | ||
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %if %{with python2} | |
101 | %files | |
102 | %defattr(644,root,root,755) | |
103 | %doc README.rst | |
104 | %dir %{py_sitedir}/%{module} | |
105 | %{py_sitedir}/%{module}/*.py[co] | |
106 | %attr(755,root,root) %{py_sitedir}/%{module}/_blist.so | |
107 | %if "%{py_ver}" > "2.4" | |
108 | %{py_sitedir}/%{module}-%{version}-py*.egg-info | |
109 | %endif | |
110 | %endif | |
111 | ||
112 | %if %{with python3} | |
113 | %files -n python3-%{module} | |
114 | %defattr(644,root,root,755) | |
115 | %doc README.rst | |
116 | %dir %{py3_sitedir}/%{module} | |
117 | %{py3_sitedir}/%{module}/*.py | |
118 | %{py3_sitedir}/%{module}/__pycache__ | |
119 | %attr(755,root,root) %{py3_sitedir}/%{module}/_blist.cpython-*.so | |
120 | %{py3_sitedir}/%{module}-%{version}-py*.egg-info | |
121 | %endif | |
122 | ||
123 | %if %{with doc} | |
124 | %files apidocs | |
125 | %defattr(644,root,root,755) | |
126 | %doc docs/_build/html/* | |
127 | %endif |