python-cmdln/python-cmdln.spec
Zhipeng Xie 7f0410fd25 init package
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2020-10-17 23:56:25 -04:00

90 lines
3.3 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
Name: python-cmdln
Version: 2.0.0
Release: 1
Summary: An improved cmd.py for writing multi-command scripts and shells.
License: http://www.opensource.org/licenses/mit-license.php
URL: http://github.com/trentm/cmdln
Source0: https://files.pythonhosted.org/packages/26/23/7654219ac89aa48190341b7c7114fea21e21889693def5f625ef2a218d5d/cmdln-2.0.0.zip
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.
%package -n python3-cmdln
Summary: An improved cmd.py for writing multi-command scripts and shells.
Provides: python-cmdln
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%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.
%package help
Summary: Development documents and examples for cmdln
Provides: python3-cmdln-doc
%description help
`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
%autosetup -n cmdln-2.0.0
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-cmdln -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Sat Oct 17 2020 Python_Bot <Python_Bot@openeuler.org>
- Package Spec generated