at 24.11-pre 1.9 kB view raw
1{ 2 lib, 3 glibcLocales, 4 buildPythonPackage, 5 fetchPypi, 6 setuptools, 7 six, 8 appdirs, 9 scandir ? null, 10 backports_os ? null, 11 typing ? null, 12 pytz, 13 enum34, 14 pyftpdlib, 15 psutil, 16 mock, 17 pythonAtLeast, 18 isPy3k, 19 pytestCheckHook, 20 stdenv, 21}: 22 23buildPythonPackage rec { 24 pname = "fs"; 25 version = "2.4.16"; 26 format = "setuptools"; 27 28 src = fetchPypi { 29 inherit pname version; 30 hash = "sha256-rpfH1RIT9LcLapWCklMCiQkN46fhWEHhCPvhRPBp0xM="; 31 }; 32 33 buildInputs = [ glibcLocales ]; 34 35 # strong cycle with parameterized 36 doCheck = false; 37 nativeCheckInputs = [ 38 pyftpdlib 39 mock 40 psutil 41 pytestCheckHook 42 ]; 43 propagatedBuildInputs = 44 [ 45 six 46 appdirs 47 pytz 48 setuptools 49 ] 50 ++ lib.optionals (!isPy3k) [ backports_os ] 51 ++ lib.optionals (!pythonAtLeast "3.6") [ typing ] 52 ++ lib.optionals (!pythonAtLeast "3.5") [ scandir ] 53 ++ lib.optionals (!pythonAtLeast "3.5") [ enum34 ]; 54 55 LC_ALL = "en_US.utf-8"; 56 57 preCheck = '' 58 HOME=$(mktemp -d) 59 ''; 60 61 pytestFlagsArray = [ "--ignore=tests/test_opener.py" ]; 62 63 disabledTests = 64 [ "user_data_repr" ] 65 ++ lib.optionals (stdenv.isDarwin) [ 66 # remove if https://github.com/PyFilesystem/pyfilesystem2/issues/430#issue-707878112 resolved 67 "test_ftpfs" 68 ] 69 ++ lib.optionals (pythonAtLeast "3.9") [ 70 # update friend version of this commit: https://github.com/PyFilesystem/pyfilesystem2/commit/3e02968ce7da7099dd19167815c5628293e00040 71 # merged into master, able to be removed after >2.4.1 72 "test_copy_sendfile" 73 ]; 74 75 __darwinAllowLocalNetworking = true; 76 77 meta = with lib; { 78 description = "Filesystem abstraction"; 79 homepage = "https://github.com/PyFilesystem/pyfilesystem2"; 80 license = licenses.bsd3; 81 maintainers = with maintainers; [ lovek323 ]; 82 platforms = platforms.unix; 83 }; 84}