at 25.11-pre 2.8 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 7 # build-system 8 hatchling, 9 hatch-vcs, 10 11 # optional-dependencies 12 adlfs, 13 pyarrow, 14 dask, 15 distributed, 16 requests, 17 dropbox, 18 aiohttp, 19 fusepy, 20 gcsfs, 21 libarchive-c, 22 ocifs, 23 panel, 24 paramiko, 25 pygit2, 26 s3fs, 27 smbprotocol, 28 tqdm, 29 30 # tests 31 numpy, 32 pytest-asyncio, 33 pytest-mock, 34 pytest-vcr, 35 pytestCheckHook, 36 writableTmpDirAsHomeHook, 37}: 38 39buildPythonPackage rec { 40 pname = "fsspec"; 41 version = "2025.3.1"; 42 pyproject = true; 43 44 src = fetchFromGitHub { 45 owner = "fsspec"; 46 repo = "filesystem_spec"; 47 tag = version; 48 hash = "sha256-85/IOxR77ozlVCVtZZ8hVmmIBFpSBn6v7zkv+vT445k="; 49 }; 50 51 build-system = [ 52 hatchling 53 hatch-vcs 54 ]; 55 56 optional-dependencies = { 57 abfs = [ adlfs ]; 58 adl = [ adlfs ]; 59 arrow = [ pyarrow ]; 60 dask = [ 61 dask 62 distributed 63 ]; 64 dropbox = [ 65 dropbox 66 # dropboxdrivefs 67 requests 68 ]; 69 entrypoints = [ ]; 70 full = [ 71 adlfs 72 aiohttp 73 dask 74 distributed 75 dropbox 76 # dropboxdrivefs 77 fusepy 78 gcsfs 79 libarchive-c 80 ocifs 81 panel 82 paramiko 83 pyarrow 84 pygit2 85 requests 86 s3fs 87 smbprotocol 88 tqdm 89 ]; 90 fuse = [ fusepy ]; 91 gcs = [ gcsfs ]; 92 git = [ pygit2 ]; 93 github = [ requests ]; 94 gs = [ gcsfs ]; 95 gui = [ panel ]; 96 hdfs = [ pyarrow ]; 97 http = [ aiohttp ]; 98 libarchive = [ libarchive-c ]; 99 oci = [ ocifs ]; 100 s3 = [ s3fs ]; 101 sftp = [ paramiko ]; 102 smb = [ smbprotocol ]; 103 ssh = [ paramiko ]; 104 tqdm = [ tqdm ]; 105 }; 106 107 nativeCheckInputs = [ 108 aiohttp 109 numpy 110 pytest-asyncio 111 pytest-mock 112 pytest-vcr 113 pytestCheckHook 114 requests 115 writableTmpDirAsHomeHook 116 ]; 117 118 __darwinAllowLocalNetworking = true; 119 120 disabledTests = 121 [ 122 # network access to aws s3 123 "test_async_cat_file_ranges" 124 ] 125 ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ 126 # works locally on APFS, fails on hydra with AssertionError comparing timestamps 127 # darwin hydra builder uses HFS+ and has only one second timestamp resolution 128 # this two tests however, assume nanosecond resolution 129 "test_modified" 130 "test_touch" 131 # tries to access /home, ignores $HOME 132 "test_directories" 133 ]; 134 135 disabledTestPaths = [ 136 # network access to github.com 137 "fsspec/implementations/tests/test_github.py" 138 ]; 139 140 pythonImportsCheck = [ "fsspec" ]; 141 142 meta = { 143 description = "Specification that Python filesystems should adhere to"; 144 homepage = "https://github.com/fsspec/filesystem_spec"; 145 changelog = "https://github.com/fsspec/filesystem_spec/raw/${version}/docs/source/changelog.rst"; 146 license = lib.licenses.bsd3; 147 maintainers = with lib.maintainers; [ nickcao ]; 148 }; 149}