python3Packages.webdataset: 0.3.2 -> 1.0.2

This commit is contained in:
Gaetan Lepage
2025-09-21 21:16:12 +00:00
parent de0331d09d
commit 2b5df0e5d5
@@ -1,8 +1,8 @@
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
curl,
# build-system
setuptools,
@@ -22,16 +22,24 @@
}:
buildPythonPackage rec {
pname = "webdataset";
version = "0.3.2";
version = "1.0.2";
pyproject = true;
src = fetchFromGitHub {
owner = "webdataset";
repo = "webdataset";
tag = "v${version}";
hash = "sha256-gjZTLf0MqSNCxyAd0H1vCF4ZptIRlY2G3l6KGTwp/Ek=";
# recent versions are not tagged on GitHub
rev = "0773837ecd298587fc89c4f944ef346ef1a6b619";
hash = "sha256-jFFRp5W9yP1mKi9x43EdOakFAd9ArnDqH3dnvFOeCmc=";
};
postPatch = ''
substituteInPlace src/webdataset/gopen.py \
--replace-fail \
'"curl"' \
'"${lib.getExe curl}"'
'';
build-system = [
setuptools
];
@@ -53,47 +61,19 @@ buildPythonPackage rec {
pythonImportsCheck = [ "webdataset" ];
preCheck = ''
export WIDS_CACHE=$TMPDIR
'';
disabledTests = [
# requires network
# Require network
"test_batched"
"test_cache_dir"
"test_concurrent_download_and_open"
"test_dataloader"
"test_decode_handlers"
"test_decoder"
"test_download"
"test_handlers"
"test_pipe"
"test_remote_file"
"test_shard_syntax"
"test_torchvision"
"test_unbatched"
"test_yaml3"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# pickling error
"test_background_download"
]
++ lib.optionals (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin) [
"test_concurrent_access"
]
++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [
# segfaults on aarch64-linux
"test_webloader"
"test_webloader2"
"test_webloader_repeat"
"test_webloader_unbatched"
];
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
# Issue with creating a temp file in the sandbox
"tests/wids/test_wids_mmtar.py"
# hangs the build *after* the tests
"tests/webdataset/test_loaders.py"
];
meta = {