diff --git a/pkgs/development/python-modules/fsspec/default.nix b/pkgs/development/python-modules/fsspec/default.nix index a3b1e9c3461e..f50260858afd 100644 --- a/pkgs/development/python-modules/fsspec/default.nix +++ b/pkgs/development/python-modules/fsspec/default.nix @@ -4,6 +4,8 @@ aiohttp, buildPythonPackage, fetchFromGitHub, + hatchling, + hatch-vcs, numpy, paramiko, pytest-asyncio, @@ -30,8 +32,8 @@ buildPythonPackage rec { pname = "fsspec"; - version = "2024.3.0"; - format = "setuptools"; + version = "2024.12.0"; + pyproject = true; disabled = pythonOlder "3.8"; @@ -39,21 +41,18 @@ buildPythonPackage rec { owner = "fsspec"; repo = "filesystem_spec"; tag = version; - hash = "sha256-C+47BcIELZTEARXW8fAMHMjyKUWxU1tNKWGoPPtt/fQ="; + hash = "sha256-Vc0vBayPg6zZ4+pxJsHChSGg0kjA0Q16+Gk0bO0IEpI="; }; - propagatedBuildInputs = [ - aiohttp - paramiko - requests - smbprotocol - tqdm + build-system = [ + hatchling + hatch-vcs ]; optional-dependencies = { - entrypoints = [ ]; abfs = [ adlfs ]; adl = [ adlfs ]; + arrow = [ pyarrow ]; dask = [ dask distributed @@ -63,28 +62,49 @@ buildPythonPackage rec { requests dropbox ]; + entrypoints = [ ]; + full = [ + adlfs + aiohttp + dask + distributed + dropbox + # dropboxdrivefs + fusepy + gcsfs + libarchive-c + ocifs + panel + paramiko + pyarrow + pygit2 + requests + s3fs + smbprotocol + tqdm + ]; + fuse = [ fusepy ]; gcs = [ gcsfs ]; git = [ pygit2 ]; github = [ requests ]; gs = [ gcsfs ]; + gui = [ panel ]; hdfs = [ pyarrow ]; - arrow = [ pyarrow ]; http = [ aiohttp requests ]; - sftp = [ paramiko ]; - s3 = [ s3fs ]; + libarchive = [ libarchive-c ]; oci = [ ocifs ]; + s3 = [ s3fs ]; + sftp = [ paramiko ]; smb = [ smbprotocol ]; ssh = [ paramiko ]; - fuse = [ fusepy ]; - libarchive = [ libarchive-c ]; - gui = [ panel ]; tqdm = [ tqdm ]; }; nativeCheckInputs = [ + aiohttp numpy pytest-asyncio pytest-mock @@ -127,11 +147,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "fsspec" ]; - meta = with lib; { + meta = { description = "Specification that Python filesystems should adhere to"; homepage = "https://github.com/fsspec/filesystem_spec"; changelog = "https://github.com/fsspec/filesystem_spec/raw/${version}/docs/source/changelog.rst"; - license = licenses.bsd3; + license = lib.licenses.bsd3; maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/s3fs/default.nix b/pkgs/development/python-modules/s3fs/default.nix index 7035c15615e7..8586914416eb 100644 --- a/pkgs/development/python-modules/s3fs/default.nix +++ b/pkgs/development/python-modules/s3fs/default.nix @@ -5,46 +5,56 @@ buildPythonPackage, docutils, fetchPypi, + flask, + flask-cors, fsspec, + moto, + pytestCheckHook, pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "s3fs"; - version = "2024.9.0"; - format = "setuptools"; + version = "2024.12.0"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-ZJNwWrtQN01reZT5YW0nrb3YohnIY1EAvcKGOC79kfU="; + hash = "sha256-Gw86j1lGzKW6KYcdZ5KrHkUo7XYjJ9iu+vyBtzuZ/VY="; }; - postPatch = '' - sed -i 's/fsspec==.*/fsspec/' requirements.txt - ''; - buildInputs = [ docutils ]; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ aiobotocore aiohttp fsspec ]; - # Depends on `moto` which has a long dependency chain with exact - # version requirements that can't be made to work with current - # pythonPackages. - doCheck = false; - pythonImportsCheck = [ "s3fs" ]; - meta = with lib; { + nativeCheckInputs = [ + flask + flask-cors + moto + pytestCheckHook + ]; + + disabledTests = [ + # require network access + "test_async_close" + ]; + + meta = { description = "Pythonic file interface for S3"; homepage = "https://github.com/fsspec/s3fs"; changelog = "https://github.com/fsspec/s3fs/raw/${version}/docs/source/changelog.rst"; - license = licenses.bsd3; - maintainers = with maintainers; [ teh ]; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ teh ]; }; }