#
# spec file for package python-configargparse
#
# Copyright (c) 2015 SUSE LINUX Products 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 http://bugs.opensuse.org/
#


Name:           python-configargparse
Version:        0.9.3
Release:        2.1
Summary:        A drop-in replacement for argparse
License:        GPL-3.0
Group:          Development/Languages/Python
Url:            https://github.com/cortesi/configargparse
Source:         https://pypi.python.org/pypi/ConfigArgParse/%{version}/ConfigArgParse-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Requires:       python-setuptools
BuildArch:      noarch

%description 
ConfigArgParse allows options to also be set via config files and/or environment 
variables.

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

%prep
%setup -q -n ConfigArgParse-%{version}
%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root %{buildroot}
%fdupes %{buildroot}

%files
%defattr(-,root,root,-)

%{python_sitelib}/configargparse*
%{python_sitelib}/ConfigArgParse-%{version}-py2.7.egg-info
%doc LICENSE 

%changelog
* Mon Mar  9 2015 freitag@owncloud.com
- Add LICENSE file to doc section of the package
- Use python-setuptools as dependency
- Use full link to source.
* Wed Mar  4 2015 freitag@owncloud.com
- Some minor cleanups.
* Wed Mar  4 2015 freitag@owncloud.com
- Update to upstream version 0.9.3 to make mitmproxy work.
* Tue Mar  3 2015 freitag@opensuse.org
- Initial package release