]>
Commit | Line | Data |
---|---|---|
8f1458fe | 1 | %define pname Levenshtein |
2 | Summary: Python extension computing string distances and similarities | |
f34cdb89 | 3 | Summary(pl.UTF-8): Rozszerzenie Pythona do obliczania odległości i podobieństw łańcuchów |
8f1458fe | 4 | Name: python-%{pname} |
5 | Version: 0.10 | |
9c18fbb1 | 6 | Release: 1 |
076d8d9a | 7 | License: GPL |
8f1458fe | 8 | Group: Libraries/Python |
9c18fbb1 | 9 | Source0: http://trific.ath.cx/Ftp//python/levenshtein/python-Levenshtein-%{version}.tar.bz2 |
8f1458fe | 10 | # Source0-md5: 88d39338fc75090da78adf43785c71b4 |
11 | URL: http://trific.ath.cx/resources/python/levenshtein/ | |
deef5ff3 | 12 | BuildRequires: python-devel >= 1:2.3.0 |
eebc01e3 | 13 | BuildRequires: python-modules |
14 | BuildRequires: rpm-pythonprov | |
8f1458fe | 15 | %pyrequires_eq python-modules |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | %description | |
683061e5 JB |
19 | Levenshtein computes Levenshtein distances, similarity ratios, |
20 | generalized medians and set medians of Strings and Unicodes. Becuase | |
21 | it's implemented in C, it's much faster than corresponding Python | |
22 | library functions and methods. | |
8f1458fe | 23 | |
f3ac28c5 JR |
24 | %description -l pl.UTF-8 |
25 | Levenshtein oblicza odległości Levenshteina, współczynniki | |
26 | podobieństwa, uogólnione mediany i mediany zbiorów dla wartości String | |
27 | i Unicode. Ponieważ jest zaimplementowany w C, jest dużo szybszy od | |
28 | odpowiadających mu funkcji bibliotecznych i metod Pythona. | |
8f1458fe | 29 | |
30 | %prep | |
683061e5 | 31 | %setup -q |
8f1458fe | 32 | |
33 | %build | |
34 | export CFLAGS="%{rpmcflags}" | |
9c18fbb1 | 35 | %{__python} setup.py build |
8f1458fe | 36 | |
37 | %install | |
38 | rm -rf $RPM_BUILD_ROOT | |
9c18fbb1 ER |
39 | %{__python} setup.py install \ |
40 | --optimize=2 \ | |
41 | --root=$RPM_BUILD_ROOT | |
8f1458fe | 42 | |
43 | %clean | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | ||
46 | %files | |
47 | %defattr(644,root,root,755) | |
48 | %doc NEWS README | |
683061e5 | 49 | %attr(755,root,root) %{py_sitedir}/%{pname}.so |
9c18fbb1 ER |
50 | %if "%{py_ver}" > "2.4" |
51 | %{py_sitedir}/python_Levenshtein-*.egg-info | |
52 | %endif |