File python-fs.spec of Package python-fs

# 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

Name:           python-fs
Version:        0.5.4
Release:        0
License:        BSD-3-Clause
Summary:        Filesystem abstraction layer
Group:          Development/Languages/Python
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()")}
BuildArch:      noarch

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

%setup -q -n fs-%{version}
%patch1 -p1
%patch2 -p1
sed -i 's/\r//' fs/contrib/tahoelafs/ fs/

python build

python install --prefix=%{_prefix} --root=%{buildroot}

pushd build/lib
LANG=en_US.UTF-8 py.test


openSUSE Build Service is sponsored by