File python-about-time.spec of Package python-about-time
#
# spec file for package python-about-time
#
# 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/
#
%define commit_hash bcabddd4c864d58b272a1d69b321ca9184ba45ac
%{?sle15_python_module_pythons}
Name: python-about-time
Version: 4.2.1
Release: 0
Summary: Measure timing and throughput of code blocks
License: MIT
URL: https://github.com/rsalmei/about-time
Source: https://github.com/rsalmei/about-time/archive/%{commit_hash}.tar.gz#/about-time-%{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
Easily measure timing and throughput of code blocks, with beautiful human friendly representations.
%prep
%autosetup -p1 -n about-time-%{commit_hash}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
rm %{buildroot}/%{_prefix}/LICENSE
%check
%pytest
%files %{python_files}
%license LICENSE
%{python_sitelib}/about_time
%{python_sitelib}/about_time-%{version}.dist-info
%changelog