2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, glibcLocales
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-08-21 13:32:41 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
, six
|
|
|
|
, appdirs
|
2021-04-26 19:14:03 +00:00
|
|
|
, scandir ? null
|
|
|
|
, backports_os ? null
|
|
|
|
, typing ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytz
|
|
|
|
, enum34
|
|
|
|
, pyftpdlib
|
|
|
|
, psutil
|
|
|
|
, mock
|
|
|
|
, pythonAtLeast
|
|
|
|
, isPy3k
|
2020-10-11 12:50:04 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fs";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "2.4.16";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-rpfH1RIT9LcLapWCklMCiQkN46fhWEHhCPvhRPBp0xM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ glibcLocales ];
|
2021-12-26 17:43:05 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# strong cycle with parameterized
|
2021-12-26 17:43:05 +00:00
|
|
|
doCheck = false;
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pyftpdlib mock psutil pytestCheckHook ];
|
2022-08-21 13:32:41 +00:00
|
|
|
propagatedBuildInputs = [ six appdirs pytz setuptools ]
|
2020-04-24 23:36:52 +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 ];
|
|
|
|
|
|
|
|
LC_ALL="en_US.utf-8";
|
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
preCheck = ''
|
|
|
|
HOME=$(mktemp -d)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-10-11 12:50:04 +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-09 12:39:15 +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-10-11 12:50:04 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Filesystem abstraction";
|
|
|
|
homepage = "https://github.com/PyFilesystem/pyfilesystem2";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|