]>
Commit | Line | Data |
---|---|---|
c72225a9 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | Summary: Fast implementation of the Cassowary constraint solver | |
7 | Summary(pl.UTF-8): Szybka implementacja rozwiązywania układu ograniczeń metodą Cassowary | |
8 | Name: python-kiwisolver | |
a8d457f7 | 9 | Version: 1.1.0 |
3f04427b | 10 | Release: 3 |
c72225a9 JB |
11 | License: BSD |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/kiwisolver/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/k/kiwisolver/kiwisolver-%{version}.tar.gz | |
a8d457f7 | 15 | # Source0-md5: fc8a614367f7ba0d34a02fd08c535afc |
c72225a9 JB |
16 | URL: https://github.com/nucleic/kiwi |
17 | BuildRequires: libstdc++-devel | |
18 | BuildRequires: rpm-pythonprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.714 | |
20 | %if %{with python2} | |
a8d457f7 | 21 | BuildRequires: python-devel >= 1:2.7 |
c72225a9 JB |
22 | BuildRequires: python-setuptools |
23 | %endif | |
24 | %if %{with python3} | |
a8d457f7 | 25 | BuildRequires: python3-devel >= 1:3.4 |
c72225a9 JB |
26 | BuildRequires: python3-setuptools |
27 | %endif | |
a8d457f7 | 28 | Requires: python-modules >= 1:2.7 |
c72225a9 JB |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
32 | Kiwi is an efficient C++ implementation of the Cassowary constraint | |
33 | solving algorithm. Kiwi is an implementation of the algorithm based on | |
34 | the seminal Cassowary paper. It is *not* a refactoring of the original | |
35 | C++ solver. Kiwi has been designed from the ground up to be | |
36 | lightweight and fast. Kiwi ranges from 10x to 500x faster than the | |
37 | original Cassowary solver with typical use cases gaining a 40x | |
38 | improvement. Memory savings are consistently > 5x. | |
39 | ||
40 | In addition to the C++ solver, Kiwi ships with hand-rolled Python | |
41 | bindings. | |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | Kiwi to napisana w C++, wydajna implementacja algorytmu rozwiązywania | |
45 | układu ograniczeń Cassowary. Kiwi to implementacja oparta na | |
46 | nowatorskim dokumencie Cassowary, nie refaktor oryginalnej | |
47 | implementacji w C++. Kiwi zostało od początku napisane z myślą o | |
48 | lekkości i szybkości; jest od 10x do 500x szybsze od oryginalnej | |
49 | implementacji, w typowych przypadkach osiągając 40-krotne | |
50 | przyspieszenie. Oszczędność pamięci jest pięciokrotna. | |
51 | ||
52 | Poza kodem w C++ Kiwi zawiera ręcznie napisane wiązania Pythona. | |
53 | ||
54 | %package -n python3-kiwisolver | |
55 | Summary: Fast implementation of the Cassowary constraint solver | |
56 | Summary(pl.UTF-8): Szybka implementacja rozwiązywania układu ograniczeń metodą Cassowary | |
57 | Group: Libraries/Python | |
a8d457f7 | 58 | Requires: python3-modules >= 1:3.4 |
c72225a9 JB |
59 | |
60 | %description -n python3-kiwisolver | |
61 | Kiwi is an efficient C++ implementation of the Cassowary constraint | |
62 | solving algorithm. Kiwi is an implementation of the algorithm based on | |
63 | the seminal Cassowary paper. It is *not* a refactoring of the original | |
64 | C++ solver. Kiwi has been designed from the ground up to be | |
65 | lightweight and fast. Kiwi ranges from 10x to 500x faster than the | |
66 | original Cassowary solver with typical use cases gaining a 40x | |
67 | improvement. Memory savings are consistently > 5x. | |
68 | ||
69 | In addition to the C++ solver, Kiwi ships with hand-rolled Python | |
70 | bindings. | |
71 | ||
72 | %description -n python3-kiwisolver -l pl.UTF-8 | |
73 | Kiwi to napisana w C++, wydajna implementacja algorytmu rozwiązywania | |
74 | układu ograniczeń Cassowary. Kiwi to implementacja oparta na | |
75 | nowatorskim dokumencie Cassowary, nie refaktor oryginalnej | |
76 | implementacji w C++. Kiwi zostało od początku napisane z myślą o | |
77 | lekkości i szybkości; jest od 10x do 500x szybsze od oryginalnej | |
78 | implementacji, w typowych przypadkach osiągając 40-krotne | |
79 | przyspieszenie. Oszczędność pamięci jest pięciokrotna. | |
80 | ||
81 | Poza kodem w C++ Kiwi zawiera ręcznie napisane wiązania Pythona. | |
82 | ||
83 | %prep | |
84 | %setup -q -n kiwisolver-%{version} | |
85 | ||
86 | %build | |
87 | %if %{with python2} | |
88 | %py_build | |
89 | %endif | |
90 | ||
91 | %if %{with python3} | |
92 | %py3_build | |
93 | %endif | |
94 | ||
95 | %install | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %if %{with python2} | |
99 | %py_install | |
100 | ||
101 | %py_postclean | |
102 | %endif | |
103 | ||
104 | %if %{with python3} | |
105 | %py3_install | |
106 | %endif | |
107 | ||
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %if %{with python2} | |
112 | %files | |
113 | %defattr(644,root,root,755) | |
a8d457f7 | 114 | %doc README.rst releasenotes.rst |
c72225a9 JB |
115 | %attr(755,root,root) %{py_sitedir}/kiwisolver.so |
116 | %{py_sitedir}/kiwisolver-%{version}-py*.egg-info | |
117 | %endif | |
118 | ||
119 | %if %{with python3} | |
120 | %files -n python3-kiwisolver | |
121 | %defattr(644,root,root,755) | |
a8d457f7 | 122 | %doc README.rst releasenotes.rst |
c72225a9 JB |
123 | %attr(755,root,root) %{py3_sitedir}/kiwisolver.cpython-*.so |
124 | %{py3_sitedir}/kiwisolver-%{version}-py*.egg-info | |
125 | %endif |