From f7748e75d774680d17b596010ba553f597f630029ce0cfbdcadf55a338b8f5c7 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Thu, 12 May 2016 08:34:57 +0000 Subject: [PATCH] Accepting request 394662 from home:frispete:python preparation for the new python-wheel: dependency of python-keyrings.alt OBS-URL: https://build.opensuse.org/request/show/394662 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fs?expand=0&rev=1 --- .gitattributes | 23 +++++++ .gitignore | 1 + fs-0.5.4.tar.gz | 3 + fs-testing-fix-missing-fuse.diff | 13 ++++ fs-testing-fix-missing-paramiko.diff | 54 ++++++++++++++++ python-fs.changes | 12 ++++ python-fs.spec | 94 ++++++++++++++++++++++++++++ 7 files changed, 200 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 fs-0.5.4.tar.gz create mode 100644 fs-testing-fix-missing-fuse.diff create mode 100644 fs-testing-fix-missing-paramiko.diff create mode 100644 python-fs.changes create mode 100644 python-fs.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/fs-0.5.4.tar.gz b/fs-0.5.4.tar.gz new file mode 100644 index 0000000..3d8fe4e --- /dev/null +++ b/fs-0.5.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba2cca8773435a7c86059d57cb4b8ea30fda40f8610941f7822d1ce3ffd36197 +size 231333 diff --git a/fs-testing-fix-missing-fuse.diff b/fs-testing-fix-missing-fuse.diff new file mode 100644 index 0000000..88bbc34 --- /dev/null +++ b/fs-testing-fix-missing-fuse.diff @@ -0,0 +1,13 @@ +Index: b/fs/tests/test_expose.py +=================================================================== +--- a/fs/tests/test_expose.py ++++ b/fs/tests/test_expose.py +@@ -58,7 +58,7 @@ class TestSFTPFS(TestRPCFS): + + try: + from fs.expose import fuse +-except ImportError: ++except (ImportError, EnvironmentError): + pass + else: + from fs.osfs import OSFS diff --git a/fs-testing-fix-missing-paramiko.diff b/fs-testing-fix-missing-paramiko.diff new file mode 100644 index 0000000..45a7f54 --- /dev/null +++ b/fs-testing-fix-missing-paramiko.diff @@ -0,0 +1,54 @@ +Index: b/fs/tests/test_expose.py +=================================================================== +--- a/fs/tests/test_expose.py ++++ b/fs/tests/test_expose.py +@@ -31,29 +31,26 @@ try: + from fs import sftpfs + from fs.expose.sftp import BaseSFTPServer + except ImportError: +- if not PY3: +- raise +- +-import logging +-logging.getLogger('paramiko').setLevel(logging.ERROR) +-logging.getLogger('paramiko.transport').setLevel(logging.ERROR) +- +- +-class TestSFTPFS(TestRPCFS): +- +- __test__ = not PY3 +- +- def makeServer(self,fs,addr): +- return BaseSFTPServer(addr,fs) +- +- def setUp(self): +- self.startServer() +- self.fs = sftpfs.SFTPFS(self.server_addr, no_auth=True) +- +- def bump(self): +- # paramiko doesn't like being bumped, just wait for it to timeout. +- # TODO: do this using a paramiko.Transport() connection +- pass ++ pass ++else: ++ import logging ++ logging.getLogger('paramiko').setLevel(logging.ERROR) ++ logging.getLogger('paramiko.transport').setLevel(logging.ERROR) ++ ++ ++ class TestSFTPFS(TestRPCFS): ++ ++ def makeServer(self,fs,addr): ++ return BaseSFTPServer(addr,fs) ++ ++ def setUp(self): ++ self.startServer() ++ self.fs = sftpfs.SFTPFS(self.server_addr, no_auth=True) ++ ++ def bump(self): ++ # paramiko doesn't like being bumped, just wait for it to timeout. ++ # TODO: do this using a paramiko.Transport() connection ++ pass + + + try: diff --git a/python-fs.changes b/python-fs.changes new file mode 100644 index 0000000..9339799 --- /dev/null +++ b/python-fs.changes @@ -0,0 +1,12 @@ +------------------------------------------------------------------- +Mon May 9 11:01:50 UTC 2016 - hpj@urpla.net + +- disable testing of fuse and paramiko dependent parts: + - fuse tests need root + - paramiko tests fail + +------------------------------------------------------------------- +Sun May 8 20:24:28 UTC 2016 - hpj@urpla.net + +- version 0.5.4: initial build + diff --git a/python-fs.spec b/python-fs.spec new file mode 100644 index 0000000..60a91c8 --- /dev/null +++ b/python-fs.spec @@ -0,0 +1,94 @@ +# +# spec file for package python-fs +# +# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 LISA GmbH, Bingen, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ + + +Name: python-fs +Version: 0.5.4 +Release: 0 +License: BSD-3-Clause +Summary: Filesystem abstraction layer +Url: http://pypi.python.org/pypi/fs/ +Group: Development/Languages/Python +Source: https://pypi.python.org/packages/04/36/d9d564bd96ef2bffb3e493bbb03f363cbdc3a0b19676621053999be78ea4/fs-%{version}.tar.gz +Patch1: fs-testing-fix-missing-fuse.diff +Patch2: fs-testing-fix-missing-paramiko.diff +BuildRequires: python-devel +BuildRequires: python-setuptools +Requires: python-setuptools +BuildRequires: python-pyftpdlib +Requires: python-pyftpdlib +BuildRequires: python-pytest +#BuildRequires: python-paramiko +#Requires: python-paramiko +BuildRequires: python-six +Requires: python-six +Suggests: python-fuse +Suggests: python-paramiko +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} && 0%{?suse_version} <= 1110 +%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%else +BuildArch: noarch +%endif + +%description +PyFilesystem is an abstraction layer for *filesystems*. In the same way that +Python's file-like objects provide a common way of accessing files, +PyFilesystem provides a common way of accessing entire filesystems. You can +write platform-independent code to work with local files, that also works with +any of the supported filesystems (zip, ftp, S3 etc.). + +Pyfilesystem works with Linux, Windows and Mac. + +Here are a few of the filesystems that can be accessed with Pyfilesystem: + +* DavFS: access files & directories on a WebDAV server +* FTPFS: access files & directories on an FTP server +* MemoryFS: access files & directories stored in memory (non-permanent but very fast) +* MountFS: creates a virtual directory structure built from other filesystems +* MultiFS: a virtual filesystem that combines a list of filesystems into one, + and checks them in order when opening files +* OSFS: the native filesystem +* SFTPFS: access files & directores stored on a Secure FTP server +* S3FS: access files & directories stored on Amazon S3 storage +* TahoeLAFS: access files & directories stored on a Tahoe distributed filesystem +* ZipFS: access files and directories contained in a zip file + +%prep +%setup -q -n fs-%{version} +%patch1 -p1 +%patch2 -p1 +sed -i 's/\r//' fs/contrib/tahoelafs/test_tahoelafs.py fs/memoryfs.py + +%build +python setup.py build + +%install +python setup.py install --prefix=%{_prefix} --root=%{buildroot} + +%check +pushd build/lib +LANG=en_US.UTF-8 py.test +popd + +%files +%defattr(-,root,root,-) +%doc LICENSE.txt README.txt CHANGES.txt AUTHORS +%{python_sitelib}/* +%{_bindir}/* + +%changelog