diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-29 11:03:43 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-29 11:03:43 +0000 |
commit | b6f3efc30c44e42171c74dcf9db60eee340ee188 (patch) | |
tree | 7314ddd5e399eb5935803d520cd2f65816d1c690 | |
parent | efd000c7529c4e0ed64d82aaf2310377ec068b69 (diff) |
automatic import of python-rclone
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-rclone.spec | 335 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 337 insertions, 0 deletions
@@ -0,0 +1 @@ +/rclone-0.4.4.tar.gz diff --git a/python-rclone.spec b/python-rclone.spec new file mode 100644 index 0000000..bfa23dd --- /dev/null +++ b/python-rclone.spec @@ -0,0 +1,335 @@ +%global _empty_manifest_terminate_build 0 +Name: python-rclone +Version: 0.4.4 +Release: 1 +Summary: Python wrapper for rclone +License: MIT +URL: https://pypi.org/project/rclone/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b7/3f/c061c7e40aa6ab1b5b70238433d157359adf1c761fff8548e183f5e8ac19/rclone-0.4.4.tar.gz +BuildArch: noarch + +Requires: python3-loguru +Requires: python3-tqdm + +%description +# Rclone for Python + +🚀 Python wrapper for rclone. + +[](https://www.python.org/downloads/) [](https://www.python.org/dev/peps/pep-0008/) + + +## Requirements +- 🐍 [Python>=3.6](https://www.python.org/downloads/) + + +## ⬇️ Installation + +```sh +pip install rclone +``` + + +## ⌨️ Usage + +```py +from rclone.rclone import Rclone + +rc = Rclone() +``` + + +## 📕 Examples + + +```py +pathname = 'gdrive:/remote/path' # you can also use a local path + + +rc.copy('foo.txt', 'remote:/path/to/dst') +# 100%|███████████████████████████████████████| 0.16/0.16 [00:00<00:00, 1.13MB/s] +``` + +```py +rc.move('bar.bin', 'remote:/path/to/dst') +# 100%|███████████████████████████████████████| 0.16/0.16 [00:00<00:00, 1.34MB/s] +``` + +```py +rc.unit = 'B' +rc.copy('foo.txt', 'remote:/path/to/dst') +# 100%|███████████████████████████| 159414.0/159414.0 [00:00<00:00, 1003822.00B/s] +``` + +```py +rclone.ls('remote:/path/to/dir') +# ['foo.bin', 'bar.txt', 'foo/'] +``` + +```py +rclone.lsjson('remote:/path/to/dir') +# [ +# { +# 'Path': 'bar.txt', +# 'Name': 'bar.txt', +# 'Size': 0, +# 'MimeType': 'text/plain; charset=utf-8', +# 'ModTime': '2022-03-22T13:07:53.557168464-04:00', +# 'IsDir': False +# } +# ] +``` + +```py +rclone.ls('remote:/path/to/dir', '-R') # you can supply additional flags to any command as positional argments +# ['foo.bin', 'bar.txt', 'foo/', 'foo/foo1.txt', 'foo/foo2', 'foo/bar/foobar.txt'] +``` + +```py +rclone.size('remote:/path/to/dir') +# {'total_objects': 5, 'total_size': 170397} +``` + +You can also use whatever subcommands/flags with `execute()`: + +```py +# +rclone.execute('ls "remote:/path/to/dir" --exclude *.txt') +# 27 foo.bin +# 159414 foo.csv.zip +# 4808 rclone.py +``` + + +%package -n python3-rclone +Summary: Python wrapper for rclone +Provides: python-rclone +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-rclone +# Rclone for Python + +🚀 Python wrapper for rclone. + +[](https://www.python.org/downloads/) [](https://www.python.org/dev/peps/pep-0008/) + + +## Requirements +- 🐍 [Python>=3.6](https://www.python.org/downloads/) + + +## ⬇️ Installation + +```sh +pip install rclone +``` + + +## ⌨️ Usage + +```py +from rclone.rclone import Rclone + +rc = Rclone() +``` + + +## 📕 Examples + + +```py +pathname = 'gdrive:/remote/path' # you can also use a local path + + +rc.copy('foo.txt', 'remote:/path/to/dst') +# 100%|███████████████████████████████████████| 0.16/0.16 [00:00<00:00, 1.13MB/s] +``` + +```py +rc.move('bar.bin', 'remote:/path/to/dst') +# 100%|███████████████████████████████████████| 0.16/0.16 [00:00<00:00, 1.34MB/s] +``` + +```py +rc.unit = 'B' +rc.copy('foo.txt', 'remote:/path/to/dst') +# 100%|███████████████████████████| 159414.0/159414.0 [00:00<00:00, 1003822.00B/s] +``` + +```py +rclone.ls('remote:/path/to/dir') +# ['foo.bin', 'bar.txt', 'foo/'] +``` + +```py +rclone.lsjson('remote:/path/to/dir') +# [ +# { +# 'Path': 'bar.txt', +# 'Name': 'bar.txt', +# 'Size': 0, +# 'MimeType': 'text/plain; charset=utf-8', +# 'ModTime': '2022-03-22T13:07:53.557168464-04:00', +# 'IsDir': False +# } +# ] +``` + +```py +rclone.ls('remote:/path/to/dir', '-R') # you can supply additional flags to any command as positional argments +# ['foo.bin', 'bar.txt', 'foo/', 'foo/foo1.txt', 'foo/foo2', 'foo/bar/foobar.txt'] +``` + +```py +rclone.size('remote:/path/to/dir') +# {'total_objects': 5, 'total_size': 170397} +``` + +You can also use whatever subcommands/flags with `execute()`: + +```py +# +rclone.execute('ls "remote:/path/to/dir" --exclude *.txt') +# 27 foo.bin +# 159414 foo.csv.zip +# 4808 rclone.py +``` + + +%package help +Summary: Development documents and examples for rclone +Provides: python3-rclone-doc +%description help +# Rclone for Python + +🚀 Python wrapper for rclone. + +[](https://www.python.org/downloads/) [](https://www.python.org/dev/peps/pep-0008/) + + +## Requirements +- 🐍 [Python>=3.6](https://www.python.org/downloads/) + + +## ⬇️ Installation + +```sh +pip install rclone +``` + + +## ⌨️ Usage + +```py +from rclone.rclone import Rclone + +rc = Rclone() +``` + + +## 📕 Examples + + +```py +pathname = 'gdrive:/remote/path' # you can also use a local path + + +rc.copy('foo.txt', 'remote:/path/to/dst') +# 100%|███████████████████████████████████████| 0.16/0.16 [00:00<00:00, 1.13MB/s] +``` + +```py +rc.move('bar.bin', 'remote:/path/to/dst') +# 100%|███████████████████████████████████████| 0.16/0.16 [00:00<00:00, 1.34MB/s] +``` + +```py +rc.unit = 'B' +rc.copy('foo.txt', 'remote:/path/to/dst') +# 100%|███████████████████████████| 159414.0/159414.0 [00:00<00:00, 1003822.00B/s] +``` + +```py +rclone.ls('remote:/path/to/dir') +# ['foo.bin', 'bar.txt', 'foo/'] +``` + +```py +rclone.lsjson('remote:/path/to/dir') +# [ +# { +# 'Path': 'bar.txt', +# 'Name': 'bar.txt', +# 'Size': 0, +# 'MimeType': 'text/plain; charset=utf-8', +# 'ModTime': '2022-03-22T13:07:53.557168464-04:00', +# 'IsDir': False +# } +# ] +``` + +```py +rclone.ls('remote:/path/to/dir', '-R') # you can supply additional flags to any command as positional argments +# ['foo.bin', 'bar.txt', 'foo/', 'foo/foo1.txt', 'foo/foo2', 'foo/bar/foobar.txt'] +``` + +```py +rclone.size('remote:/path/to/dir') +# {'total_objects': 5, 'total_size': 170397} +``` + +You can also use whatever subcommands/flags with `execute()`: + +```py +# +rclone.execute('ls "remote:/path/to/dir" --exclude *.txt') +# 27 foo.bin +# 159414 foo.csv.zip +# 4808 rclone.py +``` + + +%prep +%autosetup -n rclone-0.4.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-rclone -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.4-1 +- Package Spec generated @@ -0,0 +1 @@ +3984ee49bca6bcaf0595a679530a9ed0 rclone-0.4.4.tar.gz |