Blob Blame History Raw
# Avoid fsspec -> distributed -> dask -> fsspec dependency loop.
%bcond_without bootstrap

%global srcname fsspec

Name:           python-%{srcname}
Version:        2022.5.0
%global tag     2022.5.0
Release:        %autorelease
Summary:        Specification for Pythonic file system interfaces

License:        BSD
Source0:        %{url}/archive/%{tag}/%{srcname}-%{tag}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(pytest-asyncio)
BuildRequires:  python3dist(pytest-mock)
BuildRequires:  python3dist(pytest-vcr)
BuildRequires:  python3dist(cloudpickle)
%if %{without bootstrap}
BuildRequires:  python3dist(distributed)
BuildRequires:  python3dist(jinja2)
BuildRequires:  python3dist(lz4)
BuildRequires:  python3dist(notebook)
BuildRequires:  python3dist(numpy)
BuildRequires:  python3dist(python-snappy)
BuildRequires:  python3dist(zarr)
BuildRequires:  python3dist(zstandard)
BuildRequires:  git-core

%global _description %{expand:
Filesystem Spec is a project to unify various projects and classes to work with
remote filesystems and file-system-like abstractions using a standard pythonic

%description %{_description}

%package -n     python3-%{srcname}
Summary:        %{summary}

%description -n python3-%{srcname} %{_description}

%autosetup -n filesystem_spec-%{tag} -p1

# Skipped extras:
# - abfs and adl: Don't have adlfs
# - arrow and hdfs: Don't have pyarrow
# - dask: Don't have distributed
# - dropbox: Don't have dropboxdrivefs
# - fuse: Won't work in a build since it requires the kernel module to be loaded.
# - gcs and gs: Don't have gcsfs
# - gui: Don't have panel
# - oci: Don't have ocifs
# - s3: Don't have s3fs
# - sftp and ssh: Requires a running SSH server in a container
# - smb: Requires a running SMB server in a container.
%pyproject_buildrequires -x gcs,git,github,gs,http,libarchive,tqdm


%pyproject_save_files %{srcname}

%{pytest} -vra -k 'not test_find'  # Doesn't have a vcr cassette.

%files -n python3-%{srcname} -f %{pyproject_files}
%license LICENSE