about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/path.py/default.nix
blob: 272c34df429e78a71f4c809669aafd2324435855 (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
{ lib
, buildPythonPackage
, fetchPypi
, setuptools_scm
, pytestCheckHook
, pytest-flake8
, glibcLocales
, packaging
, isPy27
, isPy38
, backports_os
, importlib-metadata
, fetchpatch
}:

buildPythonPackage rec {
  pname = "path.py";
  version = "12.0.1";

  src = fetchPypi {
    inherit pname version;
    sha256 = "9f2169633403aa0423f6ec000e8701dd1819526c62465f5043952f92527fea0f";
  };

  checkInputs = [ pytestCheckHook pytest-flake8 glibcLocales packaging ];
  buildInputs = [ setuptools_scm ];
  propagatedBuildInputs = [
    importlib-metadata
  ] ++ lib.optional isPy27 backports_os
  ;

  LC_ALL = "en_US.UTF-8";

  meta = {
    description = "A module wrapper for os.path";
    homepage = https://github.com/jaraco/path.py;
    license = lib.licenses.mit;
  };

  # ignore performance test which may fail when the system is under load
  # test_version fails with 3.8 https://github.com/jaraco/path.py/issues/172
  disabledTests = [ "TestPerformance" ] ++ lib.optionals isPy38 [ "test_version"];

  dontUseSetuptoolsCheck = true;

  patches = [
    (fetchpatch {
      url = https://github.com/jaraco/path.py/commit/02eb16f0eb2cdc0015972ce963357aaa1cd0b84b.patch;
      sha256 = "0bqa8vjwil7jn35a6984adcm24pvv3pjkhszv10qv6yr442d1mk9";
    })
  ];

}