From 603ba289acee7c5e5b1fe3c8bdf09ee5f8097731 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 9 Mar 2023 17:29:52 +0000 Subject: automatic import of python-textfsm --- .gitignore | 1 + python-textfsm.spec | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 116 insertions(+) create mode 100644 python-textfsm.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..ed09f45 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/textfsm-1.1.3.tar.gz diff --git a/python-textfsm.spec b/python-textfsm.spec new file mode 100644 index 0000000..4692960 --- /dev/null +++ b/python-textfsm.spec @@ -0,0 +1,114 @@ +%global _empty_manifest_terminate_build 0 +Name: python-textfsm +Version: 1.1.3 +Release: 1 +Summary: Python module for parsing semi-structured text into python tables. +License: Apache License, Version 2.0 +URL: https://github.com/google/textfsm +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b8/bf/c9147d29c5a3ff4c1c876e16ea02f6d4e4f35ba1bcbb2ac80a254924f0aa/textfsm-1.1.3.tar.gz +BuildArch: noarch + + +%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-pip +%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.3 + +%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 +* Thu Mar 09 2023 Python_Bot - 1.1.3-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..8bc9c9a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +9593fa92f63fae3745986b2ebd756c60 textfsm-1.1.3.tar.gz -- cgit v1.2.3