2019-01-17 20:12:09 +01:00
|
|
|
{ lib
|
|
|
|
, glibcLocales
|
2018-10-10 21:01:40 +02:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, six
|
|
|
|
, appdirs
|
|
|
|
, scandir
|
|
|
|
, backports_os
|
|
|
|
, typing
|
|
|
|
, pytz
|
|
|
|
, enum34
|
|
|
|
, pyftpdlib
|
|
|
|
, psutil
|
|
|
|
, mock
|
|
|
|
, pythonAtLeast
|
|
|
|
, isPy3k
|
2020-09-24 08:29:42 +02:00
|
|
|
, pytestCheckHook
|
|
|
|
, stdenv
|
2018-10-10 21:01:40 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fs";
|
2019-10-16 11:43:06 +02:00
|
|
|
version = "2.4.11";
|
2018-10-10 21:01:40 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-16 11:43:06 +02:00
|
|
|
sha256 = "cc99d476b500f993df8ef697b96dc70928ca2946a455c396a566efe021126767";
|
2018-10-10 21:01:40 +02:00
|
|
|
};
|
|
|
|
|
2019-01-17 20:12:09 +01:00
|
|
|
buildInputs = [ glibcLocales ];
|
2020-09-24 08:29:42 +02:00
|
|
|
checkInputs = [ pyftpdlib mock psutil pytestCheckHook ];
|
2018-10-10 21:01:40 +02:00
|
|
|
propagatedBuildInputs = [ six appdirs pytz ]
|
2019-01-17 20:12:09 +01: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 21:01:40 +02:00
|
|
|
|
|
|
|
LC_ALL="en_US.utf-8";
|
|
|
|
|
2020-09-24 08:29:42 +02:00
|
|
|
preCheck = ''
|
|
|
|
HOME=$(mktemp -d)
|
2019-01-17 20:12:09 +01:00
|
|
|
'';
|
|
|
|
|
2020-09-24 08:29:42 +02: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"
|
|
|
|
];
|
|
|
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2019-01-17 20:12:09 +01:00
|
|
|
meta = with lib; {
|
2018-10-10 21:01:40 +02:00
|
|
|
description = "Filesystem abstraction";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/PyFilesystem/pyfilesystem2";
|
2018-10-10 21:01:40 +02:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|