File python-editdistance-s.spec of Package python-editdistance-s
#
# spec file for package python-editdistance_s
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-editdistance-s
Version: 1.0.0
Release: 0
Summary: Fast implementation of the edit distance (Levenshtein distance)
License: MIT
URL: https://www.github.com/asottile/editdistance-s
Source0: https://files.pythonhosted.org/packages/source/e/editdistance-s/editdistance_s-%{version}.tar.gz
# https://github.com/asottile/editdistance-s/issues/9
Source1: https://raw.githubusercontent.com/asottile/editdistance-s/master/tests/editdistance_s_test.py
BuildRequires: python-rpm-macros
BuildRequires: gcc-c++
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module cffi >= 1}
# SECTION test requirements
BuildRequires: %{python_module cffi >= 1}
# /SECTION
BuildRequires: fdupes
Requires: python-cffi >= 1
%python_subpackages
%description
Fast implementation of the edit distance (Levenshtein distance)
%prep
%setup -q -n editdistance_s-%{version}
%build
export CFLAGS="%{optflags}"
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
cp %{SOURCE1} .
%pytest_arch
%files %{python_files}
%{python_sitearch}/*
%license LICENSE
%changelog