File python-grapheme.spec of Package python-grapheme

#
# spec file for package python-grapheme
#
# Copyright (c) 2023 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/
#

# missing tag in Github, see https://github.com/alvinlindstam/grapheme/issues/23
%define commit_hash 66f07ca02fc64a9ea2f9b4ad66593b226d473adb

%{?sle15_python_module_pythons}
Name:           python-grapheme
Version:        0.6.0
Release:        0
Summary:        Unicode grapheme helpers
License:        MIT
URL:            https://github.com/alvinlindstam/grapheme
Source:         https://github.com/alvinlindstam/grapheme/archive/%{commit_hash}.tar.gz#/grapheme-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module wheel}
# SECTION test requirements
BuildRequires:  %{python_module pytest}
# /SECTION
BuildRequires:  fdupes
BuildArch:      noarch
%python_subpackages

%description
Unicode grapheme helpers

%prep
%autosetup -p1 -n grapheme-%{commit_hash}

%build
%pyproject_wheel

%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check
%pytest

%files %{python_files}
%doc README.rst
%{python_sitelib}/grapheme
%{python_sitelib}/grapheme-%{version}.dist-info

%changelog
openSUSE Build Service is sponsored by