From 2b5df0e5d5caa4681608eb80b38efef7d8c2d118 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 21 Sep 2025 21:03:11 +0000 Subject: [PATCH] python3Packages.webdataset: 0.3.2 -> 1.0.2 --- .../python-modules/webdataset/default.nix | 46 ++++++------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/pkgs/development/python-modules/webdataset/default.nix b/pkgs/development/python-modules/webdataset/default.nix index 9e152dd5483f..7ffca832322f 100644 --- a/pkgs/development/python-modules/webdataset/default.nix +++ b/pkgs/development/python-modules/webdataset/default.nix @@ -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 = {