]> git.pld-linux.org Git - packages/python-Levenshtein.git/blame - python-Levenshtein.spec
rebuild with python 3.10
[packages/python-Levenshtein.git] / python-Levenshtein.spec
CommitLineData
9fd66475
JP
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
a03878fa
ER
6%define module Levenshtein
7%define egg_name python_Levenshtein
8%define pypi_name python-Levenshtein
8f1458fe 9Summary: Python extension computing string distances and similarities
f34cdb89 10Summary(pl.UTF-8): Rozszerzenie Pythona do obliczania odległości i podobieństw łańcuchów
a03878fa
ER
11Name: python-%{module}
12Version: 0.12.0
00bfce67 13Release: 6
a03878fa 14License: GPL v2
8f1458fe 15Group: Libraries/Python
a03878fa
ER
16Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
17# Source0-md5: e8cde197d6d304bbdc3adae66fec99fb
18URL: https://github.com/ztane/python-Levenshtein/
9fd66475 19%if %{with python2}
deef5ff3 20BuildRequires: python-devel >= 1:2.3.0
eebc01e3 21BuildRequires: python-modules
9fd66475
JP
22%endif
23%if %{with python3}
24BuildRequires: python3-devel >= 1:2.3.0
25BuildRequires: python3-modules
26%endif
eebc01e3 27BuildRequires: rpm-pythonprov
a03878fa 28BuildRequires: rpmbuild(macros) >= 1.714
8f1458fe 29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
683061e5
JB
32Levenshtein computes Levenshtein distances, similarity ratios,
33generalized medians and set medians of Strings and Unicodes. Becuase
34it's implemented in C, it's much faster than corresponding Python
35library functions and methods.
8f1458fe 36
f3ac28c5
JR
37%description -l pl.UTF-8
38Levenshtein oblicza odległości Levenshteina, współczynniki
39podobieństwa, uogólnione mediany i mediany zbiorów dla wartości String
40i Unicode. Ponieważ jest zaimplementowany w C, jest dużo szybszy od
41odpowiadających mu funkcji bibliotecznych i metod Pythona.
8f1458fe 42
9fd66475
JP
43%package -n python3-%{module}
44Summary: Python extension computing string distances and similarities
45Summary(pl.UTF-8): Rozszerzenie Pythona do obliczania odległości i podobieństw łańcuchów
46Group: Libraries/Python
47
48%description -n python3-%{module}
49Levenshtein computes Levenshtein distances, similarity ratios,
50generalized medians and set medians of Strings and Unicodes. Becuase
51it's implemented in C, it's much faster than corresponding Python
52library functions and methods.
53
54%description -n python3-%{module} -l pl.UTF-8
55Levenshtein oblicza odległości Levenshteina, współczynniki
56podobieństwa, uogólnione mediany i mediany zbiorów dla wartości String
57i Unicode. Ponieważ jest zaimplementowany w C, jest dużo szybszy od
58odpowiadających mu funkcji bibliotecznych i metod Pythona.
59
8f1458fe 60%prep
683061e5 61%setup -q
8f1458fe 62
63%build
9fd66475 64%if %{with python2}
624d0cd5 65%py_build
9fd66475
JP
66%endif
67
68%if %{with python3}
69%py3_build
70%endif
8f1458fe 71
72%install
73rm -rf $RPM_BUILD_ROOT
9fd66475
JP
74
75%if %{with python2}
624d0cd5 76%py_install
a03878fa
ER
77%py_postclean
78
79%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/%{module}/_levenshtein.[ch]
9fd66475
JP
80%endif
81
82%if %{with python3}
83%py3_install
84
85%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/_levenshtein.[ch]
86%endif
8f1458fe 87
88%clean
89rm -rf $RPM_BUILD_ROOT
90
9fd66475 91%if %{with python2}
8f1458fe 92%files
93%defattr(644,root,root,755)
a03878fa
ER
94%doc README.rst NEWS HISTORY.txt
95%dir %{py_sitedir}/%{module}
96%{py_sitedir}/%{module}/*.py[co]
97%attr(755,root,root) %{py_sitedir}/%{module}/_levenshtein.so
98%{py_sitedir}/%{egg_name}-%{version}-py*.egg-info
9fd66475
JP
99%endif
100
101%if %{with python3}
102%files -n python3-%{module}
103%defattr(644,root,root,755)
104%doc README.rst NEWS HISTORY.txt
105%dir %{py3_sitedir}/%{module}
106%{py3_sitedir}/%{module}/*.py
107%dir %{py3_sitedir}/%{module}/__pycache__
108%{py3_sitedir}/%{module}/__pycache__/*.py[co]
109%attr(755,root,root) %{py3_sitedir}/%{module}/_levenshtein.cpython-*so
110%{py3_sitedir}/%{egg_name}-%{version}-py*.egg-info
111%endif
This page took 0.09353 seconds and 4 git commands to generate.