1{ lib
2, glibcLocales
3, buildPythonPackage
4, fetchPypi
5, six
6, appdirs
7, scandir
8, backports_os
9, typing
10, pytz
11, enum34
12, pyftpdlib
13, psutil
14, mock
15, pythonAtLeast
16, isPy3k
17, pytestCheckHook
18, stdenv
19}:
20
21buildPythonPackage rec {
22 pname = "fs";
23 version = "2.4.11";
24
25 src = fetchPypi {
26 inherit pname version;
27 sha256 = "cc99d476b500f993df8ef697b96dc70928ca2946a455c396a566efe021126767";
28 };
29
30 buildInputs = [ glibcLocales ];
31 checkInputs = [ pyftpdlib mock psutil pytestCheckHook ];
32 propagatedBuildInputs = [ six appdirs pytz ]
33 ++ lib.optionals (!isPy3k) [ backports_os ]
34 ++ lib.optionals (!pythonAtLeast "3.6") [ typing ]
35 ++ lib.optionals (!pythonAtLeast "3.5") [ scandir ]
36 ++ lib.optionals (!pythonAtLeast "3.5") [ enum34 ];
37
38 LC_ALL="en_US.utf-8";
39
40 preCheck = ''
41 HOME=$(mktemp -d)
42 '';
43
44 pytestFlagsArray = [ "--ignore=tests/test_opener.py" ];
45
46 disabledTests = [
47 "user_data_repr"
48 ] ++ lib.optionals (stdenv.isDarwin) [ # remove if https://github.com/PyFilesystem/pyfilesystem2/issues/430#issue-707878112 resolved
49 "test_ftpfs"
50 ];
51
52 __darwinAllowLocalNetworking = true;
53
54 meta = with lib; {
55 description = "Filesystem abstraction";
56 homepage = "https://github.com/PyFilesystem/pyfilesystem2";
57 license = licenses.bsd3;
58 maintainers = with maintainers; [ lovek323 ];
59 platforms = platforms.unix;
60 };
61
62}