Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 aiohttp, 5 buildPythonPackage, 6 fetchFromGitHub, 7 numpy, 8 paramiko, 9 pytest-asyncio, 10 pytest-mock, 11 pytest-vcr, 12 pytestCheckHook, 13 pythonOlder, 14 requests, 15 smbprotocol, 16 tqdm, 17 adlfs, 18 dask, 19 distributed, 20 dropbox, 21 fusepy, 22 gcsfs, 23 libarchive-c, 24 ocifs, 25 panel, 26 pyarrow, 27 pygit2, 28 s3fs, 29}: 30 31buildPythonPackage rec { 32 pname = "fsspec"; 33 version = "2024.3.0"; 34 format = "setuptools"; 35 36 disabled = pythonOlder "3.8"; 37 38 src = fetchFromGitHub { 39 owner = "fsspec"; 40 repo = "filesystem_spec"; 41 rev = "refs/tags/${version}"; 42 hash = "sha256-C+47BcIELZTEARXW8fAMHMjyKUWxU1tNKWGoPPtt/fQ="; 43 }; 44 45 propagatedBuildInputs = [ 46 aiohttp 47 paramiko 48 requests 49 smbprotocol 50 tqdm 51 ]; 52 53 passthru.optional-dependencies = { 54 entrypoints = [ ]; 55 abfs = [ adlfs ]; 56 adl = [ adlfs ]; 57 dask = [ 58 dask 59 distributed 60 ]; 61 dropbox = [ 62 # missing dropboxdrivefs 63 requests 64 dropbox 65 ]; 66 gcs = [ gcsfs ]; 67 git = [ pygit2 ]; 68 github = [ requests ]; 69 gs = [ gcsfs ]; 70 hdfs = [ pyarrow ]; 71 arrow = [ pyarrow ]; 72 http = [ 73 aiohttp 74 requests 75 ]; 76 sftp = [ paramiko ]; 77 s3 = [ s3fs ]; 78 oci = [ ocifs ]; 79 smb = [ smbprotocol ]; 80 ssh = [ paramiko ]; 81 fuse = [ fusepy ]; 82 libarchive = [ libarchive-c ]; 83 gui = [ panel ]; 84 tqdm = [ tqdm ]; 85 }; 86 87 nativeCheckInputs = [ 88 numpy 89 pytest-asyncio 90 pytest-mock 91 pytest-vcr 92 pytestCheckHook 93 ]; 94 95 preCheck = '' 96 export HOME=$(mktemp -d) 97 ''; 98 99 __darwinAllowLocalNetworking = true; 100 101 disabledTests = 102 [ 103 # Test assumes user name is part of $HOME 104 # AssertionError: assert 'nixbld' in '/homeless-shelter/foo/bar' 105 "test_strip_protocol_expanduser" 106 # test accesses this remote ftp server: 107 # https://ftp.fau.de/debian-cd/current/amd64/log/success 108 "test_find" 109 # Tests want to access S3 110 "test_urlpath_inference_errors" 111 "test_mismatch" 112 ] 113 ++ lib.optionals (stdenv.isDarwin) [ 114 # works locally on APFS, fails on hydra with AssertionError comparing timestamps 115 # darwin hydra builder uses HFS+ and has only one second timestamp resolution 116 # this two tests however, assume nanosecond resolution 117 "test_modified" 118 "test_touch" 119 # tries to access /home, ignores $HOME 120 "test_directories" 121 ]; 122 123 disabledTestPaths = [ 124 # JSON decoding issues 125 "fsspec/implementations/tests/test_dbfs.py" 126 ]; 127 128 pythonImportsCheck = [ "fsspec" ]; 129 130 meta = with lib; { 131 description = "Specification that Python filesystems should adhere to"; 132 homepage = "https://github.com/fsspec/filesystem_spec"; 133 changelog = "https://github.com/fsspec/filesystem_spec/raw/${version}/docs/source/changelog.rst"; 134 license = licenses.bsd3; 135 maintainers = [ ]; 136 }; 137}