Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / fs / default.nix
blobaa6831441d898170fe08b7a6818bd3e06b8e98cf
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
21 buildPythonPackage rec {
22   pname = "fs";
23   version = "2.4.12";
25   src = fetchPypi {
26     inherit pname version;
27     sha256 = "c10ba188b14d6213a1ca950efd004931abbfa64b294c80bbf1045753831bf42f";
28   };
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 ];
38   LC_ALL="en_US.utf-8";
40   preCheck = ''
41     HOME=$(mktemp -d)
42   '';
44   pytestFlagsArray = [ "--ignore=tests/test_opener.py" ];
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   ] ++ lib.optionals (pythonAtLeast "3.9") [
51     # update friend version of this commit: https://github.com/PyFilesystem/pyfilesystem2/commit/3e02968ce7da7099dd19167815c5628293e00040
52     # merged into master, able to be removed after >2.4.1
53     "test_copy_sendfile"
54   ];
56   __darwinAllowLocalNetworking = true;
58   meta = with lib; {
59     description = "Filesystem abstraction";
60     homepage    = "https://github.com/PyFilesystem/pyfilesystem2";
61     license     = licenses.bsd3;
62     maintainers = with maintainers; [ lovek323 ];
63     platforms   = platforms.unix;
64   };