Blob Blame History Raw
%global pypi_name normality

Name:           python-%{pypi_name}
Version:        2.5.0
Release:        %autorelease
Summary:        Tiny library for Python text normalisation

License:        MIT
Source:         %url/archive/%{version}/%{pypi_name}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(pyicu)

%global common_description %{expand:
Normality is a Python micro-package that contains a small set of text
normalization functions for easier re-use. These functions accept a snippet of
unicode or utf-8 encoded text and remove various classes of characters, such as
diacritics, punctuation etc. This is useful as a preparation to further text

%description %{common_description}

%package -n python3-%{pypi_name}
Summary:        %{summary}

%description -n python3-%{pypi_name} %{common_description}

%autosetup -p1 -n %{pypi_name}-%{version}
sed -i '/\[tool\.setuptools_scm\]/a fallback_version = "%{version}"' pyproject.toml



%pyproject_save_files %{pypi_name}

%pytest -k "not test_guess_encoding and not test_petro_iso_encoded and not test_predict_encoding"

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE