nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 97 lines 2.1 kB view raw
1{ 2 lib, 3 stdenv, 4 appdirs, 5 buildPythonPackage, 6 fetchPypi, 7 glibcLocales, 8 isPyPy, 9 mock, 10 psutil, 11 pyftpdlib, 12 pytestCheckHook, 13 pythonAtLeast, 14 pytz, 15 setuptools, 16 six, 17}: 18 19buildPythonPackage rec { 20 pname = "fs"; 21 version = "2.4.16"; 22 pyproject = true; 23 24 # https://github.com/PyFilesystem/pyfilesystem2/issues/596 25 disabled = pythonAtLeast "3.14"; 26 27 src = fetchPypi { 28 inherit pname version; 29 hash = "sha256-rpfH1RIT9LcLapWCklMCiQkN46fhWEHhCPvhRPBp0xM="; 30 }; 31 32 postPatch = '' 33 # https://github.com/PyFilesystem/pyfilesystem2/pull/591 34 substituteInPlace tests/test_ftpfs.py \ 35 --replace ThreadedTestFTPd FtpdThreadWrapper 36 ''; 37 38 build-system = [ setuptools ]; 39 40 dependencies = [ 41 setuptools 42 six 43 appdirs 44 pytz 45 ]; 46 47 nativeCheckInputs = [ 48 pyftpdlib 49 mock 50 psutil 51 pytestCheckHook 52 ] 53 ++ lib.optionals isPyPy [ 54 glibcLocales 55 ]; 56 57 LC_ALL = "en_US.utf-8"; 58 59 preCheck = '' 60 HOME=$(mktemp -d) 61 ''; 62 63 disabledTestPaths = [ 64 # Circular dependency with parameterized 65 "tests/test_move.py" 66 "tests/test_mirror.py" 67 "tests/test_copy.py" 68 # pyftpdlib removed tests from installation in 2.1.0, resulting in 69 # ModuleNotFoundError: No module named 'pyftpdlib.test' 70 "tests/test_ftpfs.py" 71 ]; 72 73 disabledTests = [ 74 "user_data_repr" 75 # https://github.com/PyFilesystem/pyfilesystem2/issues/568 76 "test_remove" 77 # Tests require network access 78 "TestFTPFS" 79 ] 80 ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ 81 # remove if https://github.com/PyFilesystem/pyfilesystem2/issues/430#issue-707878112 resolved 82 "test_ftpfs" 83 ]; 84 85 pythonImportsCheck = [ "fs" ]; 86 87 __darwinAllowLocalNetworking = true; 88 89 meta = { 90 description = "Filesystem abstraction"; 91 homepage = "https://github.com/PyFilesystem/pyfilesystem2"; 92 changelog = "https://github.com/PyFilesystem/pyfilesystem2/blob/v${version}/CHANGELOG.md"; 93 license = lib.licenses.bsd3; 94 maintainers = with lib.maintainers; [ lovek323 ]; 95 platforms = lib.platforms.unix; 96 }; 97}