File mercurial-extension-utils.spec of Package mercurial-extension-utils

#
# spec file for package python-mercurial-extension-utils
#
# Copyright (c) 2025 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/
#

%if 0%{?suse_version} > 1600
# Tumbleweed
%define pythons python3
%else
%if 0%{?sle_version} >= 150600
%{?sle15_python_module_pythons}
%else
%define pythons python3
%endif
%endif

Name:           mercurial-extension-utils
Version:        1.5.3
Release:        0
Summary:        Contains reusable functions useful while writing Mercurial extensions
License:        BSD-3-Clause
URL:            https://pypi.org/project/mercurial-extension-utils
Source0:        https://files.pythonhosted.org/packages/source/m/mercurial-extension-utils/mercurial_extension_utils-%{version}.tar.gz
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module wheel}
BuildRequires:  python-rpm-macros
BuildRequires:  fdupes
BuildRequires:  mercurial
Requires:       mercurial
BuildArch:      noarch

%description
This module contains group of reusable functions, which I found useful while writing various Mercurial extensions.

%prep
%autosetup -n mercurial_extension_utils-%{version}

%build
%pyproject_wheel

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

%check
%pytest

%files
%doc README.rst
%{python_sitelib}/mercurial_extension_utils.py
%{python_sitelib}/__pycache__/mercurial_extension_utils.*
%{python_sitelib}/mercurial_extension_utils-%{version}*-info

%changelog
openSUSE Build Service is sponsored by