%define commit dcf678068233bb4efd0449bcd003f3f435f49bd1 %define shortcommit %(c=%{commit}; echo ${c:0:7}) Name: python-cmdln Version: 1.3.0 Release: %mkrel 5 Url: http://code.google.com/p/cmdln/ Summary: An improved cmd.py for Writing Multi-command Scripts and Shells License: MIT Group: Development/Python Source: https://github.com/trentm/cmdln/archive/%{commit}/cmdln-%{version}-%{shortcommit}.tar.gz BuildRequires: python-devel BuildRequires: python-setuptools BuildArch: noarch %description `cmdln.py` is an extension of Python's default `cmd.py` module that provides "a simple framework for writing line-oriented command interpreters". The idea (with both cmd.py and cmdln.py) is to be able to quickly build multi-sub-command tools (think cvs or svn) and/or simple interactive shells (think gdb or pdb). Cmdln's extensions make it more natural to write sub-commands, integrate optparse for simple option processing, and make having good command documentation easier. %prep %setup -q -n cmdln-%{commit} %build %{__python} setup.py build %install %{__python} setup.py install --skip-build --root=%{buildroot} %files %doc LICENSE.txt README.md docs/ examples/ %{python_sitelib}/cmdln-%{version}-py%{py_ver}.egg-info %{python_sitelib}/cmdln*