2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cheroot,
|
|
|
|
colorama,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fsspec,
|
|
|
|
hatch-vcs,
|
|
|
|
hatchling,
|
|
|
|
httpx,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-dateutil,
|
|
|
|
pythonOlder,
|
|
|
|
wsgidav,
|
2022-08-21 13:32:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "webdav4";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "0.9.8";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "skshetry";
|
2023-11-16 04:20:00 +00:00
|
|
|
repo = "webdav4";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-10-30 15:09:59 +00:00
|
|
|
hash = "sha256-Le/gABaUxMmSW2SjgucsBKqjxOq1h9UCAWl5YyUsCPk=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov" ""
|
|
|
|
'';
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
nativeBuildInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
hatch-vcs
|
|
|
|
hatchling
|
2022-08-21 13:32:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
httpx
|
|
|
|
python-dateutil
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-21 13:32:41 +00:00
|
|
|
cheroot
|
|
|
|
colorama
|
2022-10-30 15:09:59 +00:00
|
|
|
pytest-xdist
|
2022-08-21 13:32:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
wsgidav
|
|
|
|
] ++ passthru.optional-dependencies.fsspec;
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
fsspec = [ fsspec ];
|
|
|
|
http2 = [ httpx.optional-dependencies.http2 ];
|
2022-08-21 13:32:41 +00:00
|
|
|
all = [
|
|
|
|
fsspec
|
|
|
|
httpx.optional-dependencies.http2
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "webdav4" ];
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# ValueError: Invalid dir_browser htdocs_path
|
|
|
|
"test_retry_reconnect_on_failure"
|
|
|
|
"test_open"
|
|
|
|
"test_open_binary"
|
|
|
|
"test_close_connection_if_nothing_is_read"
|
2023-05-24 13:37:59 +00:00
|
|
|
# Assertion error due to comparing output
|
|
|
|
"test_cp_cli"
|
|
|
|
"test_mv_cli"
|
|
|
|
"test_sync_remote_to_local"
|
2022-08-21 13:32:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests requires network access
|
|
|
|
"tests/test_client.py"
|
|
|
|
"tests/test_fsspec.py"
|
2023-11-16 04:20:00 +00:00
|
|
|
"tests/test_cli.py"
|
2022-08-21 13:32:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for interacting with WebDAV";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "dav";
|
2022-08-21 13:32:41 +00:00
|
|
|
homepage = "https://skshetry.github.io/webdav4/";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/skshetry/webdav4/releases/tag/v${version}";
|
2022-08-21 13:32:41 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|