diff --git a/editdistance-0.6.0.tar.gz b/editdistance-0.6.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..605fd74c2eb00ca10f75f86c83916f5c94ea3fa6 Binary files /dev/null and b/editdistance-0.6.0.tar.gz differ diff --git a/python-editdistance.spec b/python-editdistance.spec new file mode 100644 index 0000000000000000000000000000000000000000..93d402a6853be896b8b683e335ad2d04e27cd5ec --- /dev/null +++ b/python-editdistance.spec @@ -0,0 +1,77 @@ +%global _empty_manifest_terminate_build 0 +Name: python-editdistance +Version: 0.6.0 +Release: 1 +Summary: Fast implementation of the edit distance(Levenshtein distance) +License: None +URL: https://www.github.com/roy-ht/editdistance +Source0: https://files.pythonhosted.org/packages/b5/de/6157e01f8a5bc672d59d4183a3095d0f998ca387636881907edfa32f617b/editdistance-0.6.0.tar.gz + + +%description +This library simply implements Levenshtein distance with C++ and Cython. + +%package -n python3-editdistance +Summary: Fast implementation of the edit distance(Levenshtein distance) +Provides: python-editdistance +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-cffi +BuildRequires: gcc +BuildRequires: gdb +%description -n python3-editdistance +This library simply implements Levenshtein distance with C++ and Cython. + + +%package help +Summary: Development documents and examples for editdistance +Provides: python3-editdistance-doc +%description help +This library simply implements Levenshtein distance with C++ and Cython. + + +%prep +%autosetup -n editdistance-0.6.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . +sed -i 's/\(^.*$\)/"\1"/g' filelist.lst doclist.lst +find %{buildroot} -type f -exec file {} ';' | grep "\" | awk -F ':' '{print $1}' | xargs -i chrpath --delete "{}" + +%files -n python3-editdistance -f filelist.lst +%dir %{python3_sitearch}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Dec 20 2021 wangqia - 0.6.0-1 +- Package Spec generated