1{ lib 2, buildPythonPackage 3, cheroot 4, colorama 5, fetchFromGitHub 6, fsspec 7, hatch-vcs 8, hatchling 9, httpx 10, pytest-xdist 11, pytestCheckHook 12, python-dateutil 13, pythonOlder 14, wsgidav 15}: 16 17buildPythonPackage rec { 18 pname = "webdav4"; 19 version = "0.9.8"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.9"; 23 24 src = fetchFromGitHub { 25 owner = "skshetry"; 26 repo = "webdav4"; 27 rev = "refs/tags/v${version}"; 28 hash = "sha256-Le/gABaUxMmSW2SjgucsBKqjxOq1h9UCAWl5YyUsCPk="; 29 }; 30 31 SETUPTOOLS_SCM_PRETEND_VERSION = version; 32 33 postPatch = '' 34 substituteInPlace pyproject.toml \ 35 --replace " --cov" "" 36 ''; 37 38 nativeBuildInputs = [ 39 hatch-vcs 40 hatchling 41 ]; 42 43 propagatedBuildInputs = [ 44 httpx 45 python-dateutil 46 ]; 47 48 nativeCheckInputs = [ 49 cheroot 50 colorama 51 pytest-xdist 52 pytestCheckHook 53 wsgidav 54 ] ++ passthru.optional-dependencies.fsspec; 55 56 passthru.optional-dependencies = { 57 fsspec = [ 58 fsspec 59 ]; 60 http2 = [ 61 httpx.optional-dependencies.http2 62 ]; 63 all = [ 64 fsspec 65 httpx.optional-dependencies.http2 66 ]; 67 }; 68 69 pythonImportsCheck = [ 70 "webdav4" 71 ]; 72 73 disabledTests = [ 74 # ValueError: Invalid dir_browser htdocs_path 75 "test_retry_reconnect_on_failure" 76 "test_open" 77 "test_open_binary" 78 "test_close_connection_if_nothing_is_read" 79 # Assertion error due to comparing output 80 "test_cp_cli" 81 "test_mv_cli" 82 "test_sync_remote_to_local" 83 84 ]; 85 86 disabledTestPaths = [ 87 # Tests requires network access 88 "tests/test_client.py" 89 "tests/test_fsspec.py" 90 "tests/test_cli.py" 91 ]; 92 93 meta = with lib; { 94 description = "Library for interacting with WebDAV"; 95 homepage = "https://skshetry.github.io/webdav4/"; 96 changelog = "https://github.com/skshetry/webdav4/releases/tag/v${version}"; 97 license = with licenses; [ mit ]; 98 maintainers = with maintainers; [ fab ]; 99 }; 100}