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