1{ lib
2, stdenv
3, aiohttp
4, buildPythonPackage
5, fetchFromGitHub
6, numpy
7, paramiko
8, pytest-asyncio
9, pytest-mock
10, pytest-vcr
11, pytestCheckHook
12, pythonOlder
13, requests
14, smbprotocol
15, tqdm
16}:
17
18buildPythonPackage rec {
19 pname = "fsspec";
20 version = "2022.10.0";
21 format = "setuptools";
22
23 disabled = pythonOlder "3.7";
24
25 src = fetchFromGitHub {
26 owner = "fsspec";
27 repo = "filesystem_spec";
28 rev = version;
29 hash = "sha256-+lPt/zqI3Mkt+QRNXq+Dxm3h/ryZJsfrmayVi/BTtbg=";
30 };
31
32 propagatedBuildInputs = [
33 aiohttp
34 paramiko
35 requests
36 smbprotocol
37 tqdm
38 ];
39
40 checkInputs = [
41 numpy
42 pytest-asyncio
43 pytest-mock
44 pytest-vcr
45 pytestCheckHook
46 ];
47
48 __darwinAllowLocalNetworking = true;
49
50 disabledTests = [
51 # Test assumes user name is part of $HOME
52 # AssertionError: assert 'nixbld' in '/homeless-shelter/foo/bar'
53 "test_strip_protocol_expanduser"
54 # test accesses this remote ftp server:
55 # https://ftp.fau.de/debian-cd/current/amd64/log/success
56 "test_find"
57 ] ++ lib.optionals (stdenv.isDarwin) [
58 # works locally on APFS, fails on hydra with AssertionError comparing timestamps
59 # darwin hydra builder uses HFS+ and has only one second timestamp resolution
60 # this two tests however, assume nanosecond resolution
61 "test_modified"
62 "test_touch"
63 ];
64
65 pythonImportsCheck = [
66 "fsspec"
67 ];
68
69 meta = with lib; {
70 description = "A specification that Python filesystems should adhere to";
71 homepage = "https://github.com/fsspec/filesystem_spec";
72 changelog = "https://github.com/fsspec/filesystem_spec/raw/${version}/docs/source/changelog.rst";
73 license = licenses.bsd3;
74 maintainers = with maintainers; [ costrouc ];
75 };
76}