about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/fsspec/default.nix
blob: fbcf09de2eb3c4c1bfdf77cdb7204c37c1b2d0a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, numpy
, stdenv
, aiohttp
, pytest-vcr
, requests
}:

buildPythonPackage rec {
  pname = "fsspec";
  version = "2021.04.0";
  disabled = pythonOlder "3.5";

  src = fetchFromGitHub {
    owner = "intake";
    repo = "filesystem_spec";
    rev = version;
    sha256 = "sha256-9072kb1VEQ0xg9hB8yEzJMD2Ttd3UGjBmTuhE+Uya1k=";
  };

  checkInputs = [ pytestCheckHook numpy pytest-vcr ];

  __darwinAllowLocalNetworking = true;

  propagatedBuildInputs = [ aiohttp requests ];

  disabledTests = [
    # Test assumes user name is part of $HOME
    # AssertionError: assert 'nixbld' in '/homeless-shelter/foo/bar'
    "test_strip_protocol_expanduser"
    # test accesses this remote ftp server:
    # https://ftp.fau.de/debian-cd/current/amd64/log/success
    "test_find"
  ] ++ lib.optionals (stdenv.isDarwin) [
    # works locally on APFS, fails on hydra with AssertionError comparing timestamps
    # darwin hydra builder uses HFS+ and has only one second timestamp resolution
    # this two tests however, assume nanosecond resolution
    "test_modified"
    "test_touch"
  ];

  meta = with lib; {
    description = "A specification that python filesystems should adhere to";
    homepage = "https://github.com/intake/filesystem_spec";
    license = licenses.bsd3;
    maintainers = [ maintainers.costrouc ];
  };
}