## START: Set by rpmautospec
## (rpmautospec version 0.3.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 4;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

# Avoid dependency loops:
#     fsspec -> distributed -> dask -> fsspec
#     fsspec -> gcsfs -> fsspec
#     fsspec -> zarr -> fsspec
%bcond_with bootstrap

%global srcname fsspec

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

License:        BSD-3-Clause
URL:            https://github.com/fsspec/filesystem_spec
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) -- not yet available in Fedora
BuildRequires:  python3dist(zarr)
%endif
BuildRequires:  python3dist(jinja2)
BuildRequires:  python3dist(lz4)
BuildRequires:  python3dist(notebook)
BuildRequires:  python3dist(numpy)
BuildRequires:  python3dist(python-snappy)
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
interface.}

%description %{_description}


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

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


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

%generate_buildrequires
# Skipped extras:
# - (when bootstrapping) gcs and gs: Don't have gcsfs
# - 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.
# - 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 %{?!with_bootstrap:gcs,gs,}git,github,http,libarchive,tqdm

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{srcname}

%check
%{pytest} -vra

%files -n python3-%{srcname} -f %{pyproject_files}
%doc README.md
%license LICENSE

%changelog
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2023.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Thu Jul 20 2023 Python Maint <python-maint@redhat.com> - 2023.6.0-3
- Rebuilt for Python 3.12

* Mon Jul 10 2023 Python Maint <python-maint@redhat.com> - 2023.6.0-2
- Bootstrap for Python 3.12

* Sun Jun 11 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2023.6.0-1
- Update to latest version (#2213884)

* Sun May 07 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2023.5.0-1
- Update to latest version (#2196051)

* Sun Apr 09 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2023.4.0-1
- Update to latest version (#2185378)

* Sat Apr 08 2023 Miro Hrončok <miro@hroncok.cz> - 2023.3.0-2
- Don't bootstrap distributed forever

* Wed Mar 08 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2023.3.0-1
- Update to latest version (#2175425)

* Sun Feb 19 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2023.1.0-1
- Update to latest version (#2162546)

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2022.11.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Sun Nov 20 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2022.11.0-1
- Update to latest version (#2141492)

* Sun Oct 23 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2022.10.0-1
- Update to latest version (#2136198)

* Mon Oct 17 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2022.8.2-1
- Update to latest version (#2122769)

* Sun Jul 31 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2022.7.1-1
- Update to latest version (#2111962)

* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2022.5.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Tue Jun 21 2022 Python Maint <python-maint@redhat.com> - 2022.5.0-5
- Rebuilt for Python 3.11

* Mon Jun 20 2022 Python Maint <python-maint@redhat.com> - 2022.5.0-4
- Bootstrap for Python 3.11

* Mon Jun 20 2022 Miro Hrončok <miro@hroncok.cz> - 2022.5.0-3
- Avoid another dependency loop when bootstrapping

* Fri Jun 17 2022 Miro Hrončok <miro@hroncok.cz> - 2022.5.0-2
- Avoid another dependency loop when bootstrapping

* Mon May 23 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2022.5.0-1
- Update to latest version (#2070717)

* Tue Mar 01 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2022.2.0-1
- Update to latest version (#2057137)

* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2022.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Fri Jan 14 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2022.1.0-1
- Update to latest version (#2039400)

* Sun Dec 19 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2021.11.1-1
- Update to latest version (#2020762)

* Sat Oct 16 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2021.10.1-1
- Update to latest version (#2014568)

* Sat Oct 02 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2021.10.0-1
- Update to latest version (#2009916)

* Fri Sep 24 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2021.9.0-1
- Update to latest version (#2007409)

* Sun Sep 05 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2021.8.1-1
- Update to latest version (#1999671)

* Sun Sep 05 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2021.7.0-4
- Switch to latest Python macros

* Fri Aug 20 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2021.7.0-2
- Backport fix for fsmap.getitems

* Mon Jul 26 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2021.7.0-1
- Update to latest version (#1981808)

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2021.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Mon Jun 28 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2021.6.1-1
- Update to latest version (#1975030)

* Sat Jun 12 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2021.6.0-1
- Update to latest version (#1968578)

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2021.5.0-2
- Rebuilt for Python 3.10

* Fri May 14 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2021.5.0-1
- Update to latest version (#1960678)

* Fri Apr 16 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2021.4.0-1
- Update to latest version (#1950557)

* Tue Apr 06 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.9.0-1
- Update to latest version (#1946308)

* Sat Feb 27 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.8.7-1
- Update to latest version (#1931928)

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Tue Jan 19 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.8.5-1
- Update to latest version (#1888386)

* Fri Sep 25 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.8.3-1
- Update to latest version (#1882492)

* Fri Sep 11 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.8.2-1
- Update to latest version (#1877896)

* Wed Sep 09 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.8.1-1
- Update to latest version (#1877412)

* Sun Aug 02 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.8.0-1
- Update to latest version

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.7.4-2
- Rebuilt for Python 3.9

* Wed May 20 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.7.4-1
- Update to latest version

* Thu Apr 23 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.7.3-1
- Update to latest version

* Wed Apr 08 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.7.2-1
- Update to latest version

* Fri Mar 27 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.7.0-1
- Update to latest version

* Sun Mar 22 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.6.3-1
- Update to latest version

* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Thu Jan 09 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.6.2-1
- Update to latest version

* Fri Nov 29 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.6.1-1
- Update to latest version

* Thu Nov 21 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.6.0-1
- Update to latest version

* Thu Oct 17 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.5.2-1
- Update to latest version

* Sat Sep 28 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.5.1-1
- Update to latest version

* Thu Sep 12 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.4.4-1
- Initial package.