1{ lib
2, buildPythonPackage
3, fetchPypi
4, setuptools_scm
5, pytestCheckHook
6, pytest-flake8
7, glibcLocales
8, packaging
9, isPy27
10, isPy38
11, backports_os
12, importlib-metadata
13, fetchpatch
14}:
15
16buildPythonPackage rec {
17 pname = "path.py";
18 version = "12.0.1";
19
20 src = fetchPypi {
21 inherit pname version;
22 sha256 = "9f2169633403aa0423f6ec000e8701dd1819526c62465f5043952f92527fea0f";
23 };
24
25 checkInputs = [ pytestCheckHook pytest-flake8 glibcLocales packaging ];
26 buildInputs = [ setuptools_scm ];
27 propagatedBuildInputs = [
28 importlib-metadata
29 ] ++ lib.optional isPy27 backports_os
30 ;
31
32 LC_ALL = "en_US.UTF-8";
33
34 meta = {
35 description = "A module wrapper for os.path";
36 homepage = "https://github.com/jaraco/path.py";
37 license = lib.licenses.mit;
38 };
39
40 # ignore performance test which may fail when the system is under load
41 # test_version fails with 3.8 https://github.com/jaraco/path.py/issues/172
42 disabledTests = [ "TestPerformance" ] ++ lib.optionals isPy38 [ "test_version"];
43
44 dontUseSetuptoolsCheck = true;
45
46 patches = [
47 (fetchpatch {
48 url = "https://github.com/jaraco/path.py/commit/02eb16f0eb2cdc0015972ce963357aaa1cd0b84b.patch";
49 sha256 = "0bqa8vjwil7jn35a6984adcm24pvv3pjkhszv10qv6yr442d1mk9";
50 })
51 ];
52
53}