summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-17 02:47:29 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-17 02:47:29 +0000
commit6138eefd4d3583958096647962b6557c1c3b8203 (patch)
treed46af0ebfadb442e8c286d67a2a6045cf0b50071
parentcea521a337b1c89877b9a72a29f0b04e276a2ffb (diff)
automatic import of python-spurplus
-rw-r--r--.gitignore1
-rw-r--r--python-spurplus.spec150
-rw-r--r--sources1
3 files changed, 152 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..f2e9d34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/spurplus-2.3.4.tar.gz
diff --git a/python-spurplus.spec b/python-spurplus.spec
new file mode 100644
index 0000000..0359645
--- /dev/null
+++ b/python-spurplus.spec
@@ -0,0 +1,150 @@
+%global _empty_manifest_terminate_build 0
+Name: python-spurplus
+Version: 2.3.4
+Release: 1
+Summary: Manage remote machines and file operations over SSH.
+License: License :: OSI Approved :: MIT License
+URL: http://github.com/Parquery/spurplus
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/6a/e0/460c11750dff5f1cc15db83a624c80323dbc310e850df9aeb419f4388b8c/spurplus-2.3.4.tar.gz
+BuildArch: noarch
+
+
+%description
+Spur+ is a library to manage remote machines and perform file operations over SSH.
+It builds on top of Spur_ and Paramiko_ libraries. While we already find that Spur_ and Paramiko_ provide most of the
+functionality out-of-the-box, we missed certain features:
+- typing. Since spur supports both Python 2 and 3, it does not provide any type annotations which makes it harder to use
+ with type checkers such as mypy.
+- pathlib.Path support. We find it easier to manipulate paths using pathlib.Path instead of plain strings. spur+
+ provides support for both.
+- a function for creating directories. spur relies on sftp client. While it is fairly straightforward to get an sftp
+ client from ``spur.SshShell`` and create a directory, we think that it merits a wrapper function akin to
+ ``pathlib.Path.mkdir()`` provided how often this functionality is needed.
+- reading/writing text and binary data in one go. Similarly to creating directories, ``spur.SshShell.open()`` already
+ provides all the functionality you need to read/write files. However, we found the usage code to be more readable when
+ written in one line and no extra variables for file descriptors are introduced.
+- a function for putting and getting files to/from the remote host, respectively.
+- a function to sync a local directory to a remote directory (similar to ``rsync``).
+- a function for computing MD5 checksums.
+- a function to check if a file exists.
+- a more elaborate context manager for a temporary directory which allows for specifying prefix, suffix and
+ base directory and gives you a pathlib.Path. In contrast, ``spur.temporary_directory()`` gives you only a string with
+ no knobs.
+- an initializer function to repeatedly re-connect on connection failure. We found this function particularly important
+ when you spin a virtual instance in the cloud and need to wait for it to initialize.
+- a wrapper around paramiko's SFTP client (``spurplus.sftp.ReconnectingSFTP``) to automatically reconnect if the SFTP
+ client experienced a connection failure. While original ``spur.SshShell.open()`` creates a new SFTP client on every
+ call in order to prevent issues with time-outs, `spurplus.SshShell` is able to re-use the SFTP client over multiple
+ calls via ``spurplus.sftp.ReconnectingSFTP``.
+ This can lead up to 10x speed-up (see the benchmark in ``tests/live_test.py``).
+
+%package -n python3-spurplus
+Summary: Manage remote machines and file operations over SSH.
+Provides: python-spurplus
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-spurplus
+Spur+ is a library to manage remote machines and perform file operations over SSH.
+It builds on top of Spur_ and Paramiko_ libraries. While we already find that Spur_ and Paramiko_ provide most of the
+functionality out-of-the-box, we missed certain features:
+- typing. Since spur supports both Python 2 and 3, it does not provide any type annotations which makes it harder to use
+ with type checkers such as mypy.
+- pathlib.Path support. We find it easier to manipulate paths using pathlib.Path instead of plain strings. spur+
+ provides support for both.
+- a function for creating directories. spur relies on sftp client. While it is fairly straightforward to get an sftp
+ client from ``spur.SshShell`` and create a directory, we think that it merits a wrapper function akin to
+ ``pathlib.Path.mkdir()`` provided how often this functionality is needed.
+- reading/writing text and binary data in one go. Similarly to creating directories, ``spur.SshShell.open()`` already
+ provides all the functionality you need to read/write files. However, we found the usage code to be more readable when
+ written in one line and no extra variables for file descriptors are introduced.
+- a function for putting and getting files to/from the remote host, respectively.
+- a function to sync a local directory to a remote directory (similar to ``rsync``).
+- a function for computing MD5 checksums.
+- a function to check if a file exists.
+- a more elaborate context manager for a temporary directory which allows for specifying prefix, suffix and
+ base directory and gives you a pathlib.Path. In contrast, ``spur.temporary_directory()`` gives you only a string with
+ no knobs.
+- an initializer function to repeatedly re-connect on connection failure. We found this function particularly important
+ when you spin a virtual instance in the cloud and need to wait for it to initialize.
+- a wrapper around paramiko's SFTP client (``spurplus.sftp.ReconnectingSFTP``) to automatically reconnect if the SFTP
+ client experienced a connection failure. While original ``spur.SshShell.open()`` creates a new SFTP client on every
+ call in order to prevent issues with time-outs, `spurplus.SshShell` is able to re-use the SFTP client over multiple
+ calls via ``spurplus.sftp.ReconnectingSFTP``.
+ This can lead up to 10x speed-up (see the benchmark in ``tests/live_test.py``).
+
+%package help
+Summary: Development documents and examples for spurplus
+Provides: python3-spurplus-doc
+%description help
+Spur+ is a library to manage remote machines and perform file operations over SSH.
+It builds on top of Spur_ and Paramiko_ libraries. While we already find that Spur_ and Paramiko_ provide most of the
+functionality out-of-the-box, we missed certain features:
+- typing. Since spur supports both Python 2 and 3, it does not provide any type annotations which makes it harder to use
+ with type checkers such as mypy.
+- pathlib.Path support. We find it easier to manipulate paths using pathlib.Path instead of plain strings. spur+
+ provides support for both.
+- a function for creating directories. spur relies on sftp client. While it is fairly straightforward to get an sftp
+ client from ``spur.SshShell`` and create a directory, we think that it merits a wrapper function akin to
+ ``pathlib.Path.mkdir()`` provided how often this functionality is needed.
+- reading/writing text and binary data in one go. Similarly to creating directories, ``spur.SshShell.open()`` already
+ provides all the functionality you need to read/write files. However, we found the usage code to be more readable when
+ written in one line and no extra variables for file descriptors are introduced.
+- a function for putting and getting files to/from the remote host, respectively.
+- a function to sync a local directory to a remote directory (similar to ``rsync``).
+- a function for computing MD5 checksums.
+- a function to check if a file exists.
+- a more elaborate context manager for a temporary directory which allows for specifying prefix, suffix and
+ base directory and gives you a pathlib.Path. In contrast, ``spur.temporary_directory()`` gives you only a string with
+ no knobs.
+- an initializer function to repeatedly re-connect on connection failure. We found this function particularly important
+ when you spin a virtual instance in the cloud and need to wait for it to initialize.
+- a wrapper around paramiko's SFTP client (``spurplus.sftp.ReconnectingSFTP``) to automatically reconnect if the SFTP
+ client experienced a connection failure. While original ``spur.SshShell.open()`` creates a new SFTP client on every
+ call in order to prevent issues with time-outs, `spurplus.SshShell` is able to re-use the SFTP client over multiple
+ calls via ``spurplus.sftp.ReconnectingSFTP``.
+ This can lead up to 10x speed-up (see the benchmark in ``tests/live_test.py``).
+
+%prep
+%autosetup -n spurplus-2.3.4
+
+%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-spurplus -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 17 2023 Python_Bot <Python_Bot@openeuler.org> - 2.3.4-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..c71e4de
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+dc6f71c9c9ed460d14a428850e07066c spurplus-2.3.4.tar.gz