%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")} %define oname argparse Summary: Optparse inspired command line parser for Python Name: python-argparse Version: 0.8.0 Release: 1%{?dist} License: BSD Group: Development/Languages URL: http://argparse.python-hosting.com/ Source0: http://pypi.python.org/packages/source/a/argparse/argparse-0.8.0.zip BuildRequires: python-devel python-setuptools dos2unix BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description The argparse module is an optparse-inspired command line parser that improves on optparse by: * handling both optional and positional arguments * supporting parsers that dispatch to sub-parsers * producing more informative usage messages * supporting actions that consume any number of command-line args * allowing types and actions to be specified with simple callables instead of hacking class attributes like STORE_ACTIONS or CHECK_METHODS as well as including a number of other more minor improvements on the optparse API. %prep %setup -q -n %{oname}-%{version} dos2unix -k README.txt %build %{__python} setup.py build %install %{__rm} -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} %check %{__python} test_%{oname}.py %clean %{__rm} -rf %{buildroot} %files %defattr(-, root, root, -) %doc README.txt %{python_sitelib}/%{oname}.py* %{python_sitelib}/%{oname}-%{version}-py%{pyver}.egg-info/ %changelog * Sat Jan 17 2009 Terje Rosten - 0.8.0-1 - initial build