File python-click-option-group.spec of Package python-click-option-group
#
# spec file for package python-click-option-group
#
# Copyright (c) 2022 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/
#
%{?sle15_python_module_pythons}
Name: python-click-option-group
Version: 0.5.6
Release: 0
Summary: Option groups missing in Click
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/click-contrib/click-option-group
Source0: https://github.com/click-contrib/click-option-group/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module click >= 7.0}
%requires_ge python-click >= 7.0
BuildRequires: %{python_module Sphinx >= 2.3}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module coveralls}
BuildRequires: python-rpm-macros
BuildRequires: fdupes
#BuildArch: noarch
%python_subpackages
%description
click-option-group is a Click-extension package that adds option groups missing in Click.
%prep
%setup -q -n click-option-group-%{version}
%build
# Remove export CFLAGS=... for noarch packages (unneeded)
export CFLAGS="%{optflags}"
%python_build
%install
%python_install
# Fix python-bytecode-inconsistent-mtime
pushd %{buildroot}%{python_sitelib}
find . -name '*.pyc' -exec rm -f '{}' ';'
python%python_bin_suffix -m compileall *.py ';'
popd
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# test_missing_group_decl_first_api fails with click 8.1.8 https://github.com/click-contrib/click-option-group/issues/65
%pytest -k "not test_missing_group_decl_first_api"
%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/*
%changelog