summary refs log tree commit diff
path: root/pkgs/development/python-modules/pathy/default.nix
blob: d937c0a43128b9a3f3e0b4d705db69434cc967a8 (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
53
54
55
56
57
58
59
60
61
62
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, google-cloud-storage
, mock
, pytestCheckHook
, pythonOlder
, smart-open
, typer
}:

buildPythonPackage rec {
  pname = "pathy";
  version = "0.6.1";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "838624441f799a06b446a657e4ecc9ebc3fdd05234397e044a7c87e8f6e76b1c";
  };

  propagatedBuildInputs = [
    smart-open
    typer
    google-cloud-storage
  ];

  checkInputs = [
    mock
    pytestCheckHook
  ];

  patches = [
    # Support for smart-open >= 6.0.0, https://github.com/justindujardin/pathy/pull/71
    (fetchpatch {
      name = "support-later-smart-open.patch";
      url = "https://github.com/justindujardin/pathy/commit/ba1c23df6ee5d1e57bdfe845ff6a9315cba3df6a.patch";
      sha256 = "sha256-V1i4tx73Xkdqb/wZhQIv4p6FVpF9SEfDhlBkwaaRE3w=";
    })
  ];

  disabledTestPaths = [
    # Exclude tests that require provider credentials
    "pathy/_tests/test_clients.py"
    "pathy/_tests/test_gcs.py"
    "pathy/_tests/test_s3.py"
  ];

  pythonImportsCheck = [
    "pathy"
  ];

  meta = with lib; {
    description = "A Path interface for local and cloud bucket storage";
    homepage = "https://github.com/justindujardin/pathy";
    license = licenses.asl20;
    maintainers = with maintainers; [ melling ];
  };
}