commit
b86362a40c
116
python-textfsm.spec
Normal file
116
python-textfsm.spec
Normal file
@ -0,0 +1,116 @@
|
||||
%global _empty_manifest_terminate_build 0
|
||||
Name: python-textfsm
|
||||
Version: 1.1.0
|
||||
Release: 1
|
||||
Summary: Python module for parsing semi-structured text into python tables.
|
||||
License: ASL 2.0
|
||||
URL: https://github.com/google/textfsm
|
||||
Source0: https://github.com/google/textfsm/archive/v%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: python3-future
|
||||
Requires: python3-six
|
||||
|
||||
%description
|
||||
Python module which implements a template based state machine for parsing
|
||||
semi-formatted text. Originally developed to allow programmatic access to
|
||||
information returned from the command line interface (CLI) of networking
|
||||
devices.
|
||||
The engine takes two inputs - a template file, and text input (such as command
|
||||
responses from the CLI of a device) and returns a list of records that contains
|
||||
the data parsed from the text.
|
||||
A template file is needed for each uniquely structured text input. Some examples
|
||||
are provided with the code and users are encouraged to develop their own.
|
||||
By developing a pool of template files, scripts can call TextFSM to parse useful
|
||||
information from a variety of sources. It is also possible to use different
|
||||
templates on the same data in order to create different tables (or views).
|
||||
TextFSM was developed internally at Google and released under the Apache 2.0
|
||||
licence for the benefit of the wider community.
|
||||
[**See documentation for more details.**](https://github.com/google/textfsm/wiki/TextFSM)
|
||||
|
||||
%package -n python3-textfsm
|
||||
Summary: Python module for parsing semi-structured text into python tables.
|
||||
Provides: python-textfsm
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-six
|
||||
%description -n python3-textfsm
|
||||
Python module which implements a template based state machine for parsing
|
||||
semi-formatted text. Originally developed to allow programmatic access to
|
||||
information returned from the command line interface (CLI) of networking
|
||||
devices.
|
||||
The engine takes two inputs - a template file, and text input (such as command
|
||||
responses from the CLI of a device) and returns a list of records that contains
|
||||
the data parsed from the text.
|
||||
A template file is needed for each uniquely structured text input. Some examples
|
||||
are provided with the code and users are encouraged to develop their own.
|
||||
By developing a pool of template files, scripts can call TextFSM to parse useful
|
||||
information from a variety of sources. It is also possible to use different
|
||||
templates on the same data in order to create different tables (or views).
|
||||
TextFSM was developed internally at Google and released under the Apache 2.0
|
||||
licence for the benefit of the wider community.
|
||||
[**See documentation for more details.**](https://github.com/google/textfsm/wiki/TextFSM)
|
||||
|
||||
%package help
|
||||
Summary: Development documents and examples for textfsm
|
||||
Provides: python3-textfsm-doc
|
||||
%description help
|
||||
Python module which implements a template based state machine for parsing
|
||||
semi-formatted text. Originally developed to allow programmatic access to
|
||||
information returned from the command line interface (CLI) of networking
|
||||
devices.
|
||||
The engine takes two inputs - a template file, and text input (such as command
|
||||
responses from the CLI of a device) and returns a list of records that contains
|
||||
the data parsed from the text.
|
||||
A template file is needed for each uniquely structured text input. Some examples
|
||||
are provided with the code and users are encouraged to develop their own.
|
||||
By developing a pool of template files, scripts can call TextFSM to parse useful
|
||||
information from a variety of sources. It is also possible to use different
|
||||
templates on the same data in order to create different tables (or views).
|
||||
TextFSM was developed internally at Google and released under the Apache 2.0
|
||||
licence for the benefit of the wider community.
|
||||
[**See documentation for more details.**](https://github.com/google/textfsm/wiki/TextFSM)
|
||||
|
||||
%prep
|
||||
%autosetup -n textfsm-1.1.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-textfsm -f filelist.lst
|
||||
%dir %{python3_sitelib}/*
|
||||
|
||||
%files help -f doclist.lst
|
||||
%{_docdir}/*
|
||||
|
||||
%changelog
|
||||
* Mon Mar 15 2021 Python_Bot <Python_Bot@openeuler.org>
|
||||
- Package Spec generated
|
||||
BIN
v1.1.0.tar.gz
Normal file
BIN
v1.1.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user