File python-icecream.spec of Package python-icecream
#
# spec file for package python-icecream
#
# 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/
#
#%%{?!python_module:%%define python_module() python-%%{**} python3-%%{**}}
%{?sle15_python_module_pythons}
Name: python-icecream
Version: 2.1.3
Release: 0
Summary: Never use print() to debug again
License: MIT
Group: Development/Languages/Python
URL: https://github.com/gruns/icecream
Source: https://files.pythonhosted.org/packages/source/i/icecream/icecream-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module setuptools}
# SECTION test requirements
BuildRequires: %{python_module asttokens >= 2.0.1}
BuildRequires: %{python_module colorama >= 0.3.9}
BuildRequires: %{python_module executing >= 0.3.1}
BuildRequires: %{python_module pygments >= 2.2.0}
# /SECTION
BuildRequires: fdupes
Requires: python-asttokens >= 2.0.1
Requires: python-colorama >= 0.3.9
Requires: python-executing >= 0.3.1
Requires: python-pygments >= 2.2.0
BuildArch: noarch
%python_subpackages
%description
Never use print() to debug again; inspect variables, expressions, and program execution with a single, simple function call.
%prep
%setup -q -n icecream-%{version}
# rpmlint
find . -type f "(" -name '*.txt' -o -name 'PKG-INFO' -o -name '*.md' ")" -exec chmod -x {} \;
%build
%python_build
%install
%python_install
%{python_expand
sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/icecream/icecream.py
chmod +x %{buildroot}%{$python_sitelib}/icecream/icecream.py
%fdupes %{buildroot}%{$python_sitelib}
}
%check
#CHOOSE: %%pytest OR %%pyunittest -v OR CUSTOM
#%%pytest
%pyunittest -v
%files %{python_files}
%doc README.md
%license LICENSE.txt
%{python_sitelib}/*
%changelog