From 25610f6a0693e4a9b1ef226a9de3fad4dbcf1302 Mon Sep 17 00:00:00 2001 From: Andrea Veri Date: Apr 20 2016 11:07:45 +0000 Subject: Introduce a Python 3 package now that upstream supports it --- diff --git a/python-cmdln.spec b/python-cmdln.spec index 7c4096b..94d46c0 100644 --- a/python-cmdln.spec +++ b/python-cmdln.spec @@ -1,4 +1,4 @@ -%global commit 465c412b297da98b6e7a8926644ebf5ecf2faeaf +%global commit 465c412b297da98b6e7a8926644ebf5ecf2faeaf %global shortcommit %(c=%{commit}; echo ${c:0:7}) Summary: An improved cmd.py for Writing Multi-command Scripts and Shells @@ -10,8 +10,9 @@ License: MIT Group: Development/Libraries BuildRequires: python-setuptools BuildRequires: python2-devel +BuildRequires: python3-devel URL: https://github.com/trentm/cmdln -BuildArch: noarch +BuildArch: noarch %description `cmdln.py` is an extension of Python's default `cmd.py` module that @@ -23,10 +24,10 @@ it more natural to write sub-commands, integrate optparse for simple option processing, and make having good command documentation easier. %package doc -License: MIT -Summary: An improved cmd.py for Writing Multi-command Scripts and Shells -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +License: MIT +Summary: An improved cmd.py for Writing Multi-command Scripts and Shells +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} %description doc `cmdln.py` is an extension of Python's default `cmd.py` module that @@ -39,27 +40,73 @@ option processing, and make having good command documentation easier. Documentation package. +%package -n python2-cmdln +License: MIT +Summary: An improved cmd.py for Writing Multi-command Scripts and Shells +Group: Development/Libraries +%{?python_provide:%python_provide python2-cmdln} + +%description -n python2-cmdln +`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. + +Python 2 compatible module. + +%package -n python3-cmdln +License: MIT +Summary: An improved cmd.py for Writing Multi-command Scripts and Shells +Group: Development/Libraries +%{?python_provide:%python_provide python3-cmdln} + +%description -n python3-cmdln +`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. + +Python 3 compatible module. + %prep -%setup -q -n cmdln-%{commit} +%setup -q -n cmdln-%{version} %build export CFLAGS="%{optflags}" %{__python2} setup.py build +%{__python3} setup.py build %install %{__python2} setup.py install \ --prefix=%{_prefix} \ --root=%{buildroot} -%files -%{python_sitelib}/cmdln* +%{__python3} setup.py install \ + --prefix=%{_prefix} \ + --root=%{buildroot} + +%files -n python2-cmdln +%license LICENSE.txt +%{python2_sitelib}/* + +%files -n python3-cmdln +%license LICENSE.txt +%{python3_sitelib}/* %files doc -%doc LICENSE.txt README.md docs/* examples/* +%license LICENSE.txt +%doc README.md docs/* examples/* %changelog * Wed Apr 20 2016 Andrea Veri - 2.0.0-1 - New upstream release. +- Introduce a Python 3 package as upstream now supports it. * Thu Feb 04 2016 Fedora Release Engineering - 1.3.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild