2019-01-17 19:12:09 +00:00
|
|
|
{ lib
|
|
|
|
, glibcLocales
|
2018-10-10 19:01:40 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, six
|
|
|
|
, appdirs
|
2021-03-25 07:23:40 +00:00
|
|
|
, scandir ? null
|
2021-03-24 16:45:56 +00:00
|
|
|
, backports_os ? null
|
2021-03-25 07:23:40 +00:00
|
|
|
, typing ? null
|
2018-10-10 19:01:40 +00:00
|
|
|
, pytz
|
|
|
|
, enum34
|
|
|
|
, pyftpdlib
|
|
|
|
, psutil
|
|
|
|
, mock
|
|
|
|
, pythonAtLeast
|
|
|
|
, isPy3k
|
2020-09-24 06:29:42 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, stdenv
|
2018-10-10 19:01:40 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fs";
|
2021-06-18 21:47:16 +00:00
|
|
|
version = "2.4.13";
|
2018-10-10 19:01:40 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-18 21:47:16 +00:00
|
|
|
sha256 = "caab4dc1561d63c92f36ee78976f6a4a01381830d8420ce34a78d4f1bb1dc95f";
|
2018-10-10 19:01:40 +00:00
|
|
|
};
|
|
|
|
|
2019-01-17 19:12:09 +00:00
|
|
|
buildInputs = [ glibcLocales ];
|
2020-09-24 06:29:42 +00:00
|
|
|
checkInputs = [ pyftpdlib mock psutil pytestCheckHook ];
|
2018-10-10 19:01:40 +00:00
|
|
|
propagatedBuildInputs = [ six appdirs pytz ]
|
2019-01-17 19:12:09 +00:00
|
|
|
++ lib.optionals (!isPy3k) [ backports_os ]
|
|
|
|
++ lib.optionals (!pythonAtLeast "3.6") [ typing ]
|
|
|
|
++ lib.optionals (!pythonAtLeast "3.5") [ scandir ]
|
|
|
|
++ lib.optionals (!pythonAtLeast "3.5") [ enum34 ];
|
2018-10-10 19:01:40 +00:00
|
|
|
|
|
|
|
LC_ALL="en_US.utf-8";
|
|
|
|
|
2020-09-24 06:29:42 +00:00
|
|
|
preCheck = ''
|
|
|
|
HOME=$(mktemp -d)
|
2019-01-17 19:12:09 +00:00
|
|
|
'';
|
|
|
|
|
2020-09-24 06:29:42 +00:00
|
|
|
pytestFlagsArray = [ "--ignore=tests/test_opener.py" ];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"user_data_repr"
|
|
|
|
] ++ lib.optionals (stdenv.isDarwin) [ # remove if https://github.com/PyFilesystem/pyfilesystem2/issues/430#issue-707878112 resolved
|
|
|
|
"test_ftpfs"
|
2020-12-06 18:00:54 +00:00
|
|
|
] ++ lib.optionals (pythonAtLeast "3.9") [
|
|
|
|
# update friend version of this commit: https://github.com/PyFilesystem/pyfilesystem2/commit/3e02968ce7da7099dd19167815c5628293e00040
|
|
|
|
# merged into master, able to be removed after >2.4.1
|
|
|
|
"test_copy_sendfile"
|
2020-09-24 06:29:42 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2019-01-17 19:12:09 +00:00
|
|
|
meta = with lib; {
|
2018-10-10 19:01:40 +00:00
|
|
|
description = "Filesystem abstraction";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/PyFilesystem/pyfilesystem2";
|
2018-10-10 19:01:40 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|