1{ lib
2, buildPythonPackage
3, fetchPypi
4, six
5, pythonOlder
6, scandir ? null
7, glibcLocales
8, mock
9, typing
10}:
11
12buildPythonPackage rec {
13 pname = "pathlib2";
14 version = "2.3.7.post1";
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-n+DtrYmLg8DD4ZnIQrJ+0hZkXS4Xd1ey3Wc4TUETxkE=";
19 };
20
21 propagatedBuildInputs = [ six ]
22 ++ lib.optionals (pythonOlder "3.5") [ scandir typing ];
23 nativeCheckInputs = [ glibcLocales ]
24 ++ lib.optional (pythonOlder "3.3") mock;
25
26 preCheck = ''
27 export LC_ALL="en_US.UTF-8"
28 '';
29
30 meta = with lib; {
31 description = "This module offers classes representing filesystem paths with semantics appropriate for different operating systems.";
32 homepage = "https://pypi.org/project/pathlib2/";
33 license = with licenses; [ mit ];
34 maintainers = with maintainers; [ ];
35 };
36}