Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.9 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 = "refs/tags/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 nativeCheckInputs = [ 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 # Assertion error due to comparing output 80 "test_cp_cli" 81 "test_mv_cli" 82 "test_sync_remote_to_local" 83 ]; 84 85 disabledTestPaths = [ 86 # Tests requires network access 87 "tests/test_client.py" 88 "tests/test_fsspec.py" 89 ]; 90 91 meta = with lib; { 92 description = "Library for interacting with WebDAV"; 93 homepage = "https://skshetry.github.io/webdav4/"; 94 changelog = "https://github.com/skshetry/webdav4/releases/tag/v${version}"; 95 license = with licenses; [ mit ]; 96 maintainers = with maintainers; [ fab ]; 97 }; 98}