File python-configargparse.spec of Package python-configargparse

# spec file for package python-configargparse
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-configargparse
Version:        0.15.1
Release:        0
Summary:        A drop-in replacement for argparse
License:        MIT
Group:          Development/Languages/Python
BuildRequires:  %{python_module PyYAML}
BuildRequires:  %{python_module mock}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  python2-devel
BuildRequires:  python2-unittest2
Requires:       python-PyYAML
Requires:       python-setuptools
BuildArch:      noarch

ConfigArgParse allows options to also be set via config files and/or environment

Applications with more than a handful of user-settable options are best configured
through a combination of command line args, config files, hard-coded defaults, and
in some cases, environment variables.

Python’s command line parsing modules such as argparse have very limited support
for config files and environment variables, so this module extends argparse to
add these features

%setup -q -n ConfigArgParse-%{version}


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

%pytest -k 'not (test_main or test_help_with_metavar or testGlobalInstances or testGlobalInstances_WithName or testConfigOrEnvValueErrors)'

%files %{python_files}
%doc README.rst
%license LICENSE
%pycache_only %{python_sitelib}/__pycache__