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