at 23.05-pre 1.7 kB view raw
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 format = "pyproject"; 21 22 disabled = pythonOlder "3.9"; 23 24 src = fetchFromGitHub { 25 owner = "skshetry"; 26 repo = pname; 27 rev = "v${version}"; 28 hash = "sha256-Le/gABaUxMmSW2SjgucsBKqjxOq1h9UCAWl5YyUsCPk="; 29 }; 30 31 SETUPTOOLS_SCM_PRETEND_VERSION = version; 32 33 nativeBuildInputs = [ 34 hatch-vcs 35 hatchling 36 ]; 37 38 propagatedBuildInputs = [ 39 httpx 40 python-dateutil 41 ]; 42 43 checkInputs = [ 44 cheroot 45 colorama 46 pytest-xdist 47 pytestCheckHook 48 wsgidav 49 ] ++ passthru.optional-dependencies.fsspec; 50 51 passthru.optional-dependencies = { 52 fsspec = [ 53 fsspec 54 ]; 55 http2 = [ 56 httpx.optional-dependencies.http2 57 ]; 58 all = [ 59 fsspec 60 httpx.optional-dependencies.http2 61 ]; 62 }; 63 64 postPatch = '' 65 substituteInPlace pyproject.toml \ 66 --replace " --cov" "" 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 ]; 80 81 disabledTestPaths = [ 82 # Tests requires network access 83 "tests/test_client.py" 84 "tests/test_fsspec.py" 85 ]; 86 87 meta = with lib; { 88 description = "Library for interacting with WebDAV"; 89 homepage = "https://skshetry.github.io/webdav4/"; 90 license = with licenses; [ mit ]; 91 maintainers = with maintainers; [ fab ]; 92 }; 93}