Blob Blame Raw
%global srcname ConfigArgParse

Name:           python-configargparse
Version:        0.9.3
Release:        7%{?dist}
Summary:        A Python module with support for argparse, config files, and env variables

License:        MIT
URL:            https://github.com/bw2/ConfigArgParse
Source0:        https://pypi.python.org/packages/source/C/%{srcname}/%{srcname}-%{version}.tar.gz
Patch1:		python26.patch
Buildarch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-argparse

%description
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.


%package -n python2-configargparse
Summary:        %{summary}
%{?python_provide:%python_provide python2-configargparse}

%description -n python2-configargparse
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 -n %{srcname}-%{version}

%patch1 -p0 -b .python26

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build

%install
%{__python} setup.py install --skip-build --root %{buildroot}

%files -n python2-configargparse
%doc README.rst
%doc LICENSE
%{python_sitelib}/configargparse.py*
%{python_sitelib}/%{srcname}*.egg-info

%changelog
* Sat Dec 12 2015 Nick Le Mouton <nick@noodles.net.nz> - 0.9.3-7
- Fixed spec syntax for el6

* Sat Dec 12 2015 Nick Le Mouton <nick@noodles.net.nz> - 0.9.3-6
- Fixed Build Requires

* Sat Dec 12 2015 Nick Le Mouton <nick@noodles.net.nz> - 0.9.3-5
- Initial el6 build
- Added patch to allow ConfigArgParse to build on el6

* Thu Nov 12 2015 Kalev Lember <klember@redhat.com> - 0.9.3-4
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Nov 05 2015 Fabian Affolter <mail@fabian-affolter.ch> - 0.9.3-3
- Remove old parts

* Fri Oct 30 2015 Fabian Affolter <mail@fabian-affolter.ch> - 0.9.3-2
- Update macros

* Thu Feb 05 2015 Fabian Affolter <mail@fabian-affolter.ch> - 0.9.3-1
- Initial package