python312Packages.ale-py: 0.10.2 -> 0.11.0 (#402003)

authored by OTABI Tomoya and committed by GitHub 15b12bda 8857bc86

+41 -14
+41 -14
pkgs/development/python-modules/ale-py/default.nix
··· 9 9 ninja, 10 10 pybind11, 11 11 setuptools, 12 - wheel, 13 12 14 13 # buildInputs 15 14 SDL2, 15 + opencv, 16 16 zlib, 17 17 18 18 # dependencies ··· 22 22 23 23 # tests 24 24 gymnasium, 25 + opencv-python, 25 26 pytestCheckHook, 27 + 28 + # Whether to enable recently added vector environments: 29 + # https://github.com/Farama-Foundation/Arcade-Learning-Environment/blob/v0.11.0/docs/vector-environment.md 30 + # FIXME: Disabled by default as it mysteriously causes stable-baselines3's tests to hang indefinitely. 31 + withVectorEnv ? false, 26 32 }: 27 33 28 34 buildPythonPackage rec { 29 35 pname = "ale-py"; 30 - version = "0.10.2"; 36 + version = "0.11.0"; 31 37 pyproject = true; 32 38 33 39 src = fetchFromGitHub { 34 40 owner = "Farama-Foundation"; 35 41 repo = "Arcade-Learning-Environment"; 36 42 tag = "v${version}"; 37 - hash = "sha256-CGUlQFQoQZqs+Jd3IU/o50VwX+tEHrs3KHrcVWahEpo="; 43 + hash = "sha256-RgFVpbjJp54FncQzFtdZM7p/1GBMsQ2HvLgIoaokiQc="; 38 44 }; 39 45 40 46 build-system = [ ··· 42 48 ninja 43 49 pybind11 44 50 setuptools 45 - wheel 46 51 ]; 47 52 48 - buildInputs = [ 49 - SDL2 50 - zlib 51 - ]; 53 + buildInputs = 54 + [ 55 + SDL2 56 + zlib 57 + ] 58 + ++ lib.optionals withVectorEnv [ 59 + opencv 60 + ]; 52 61 53 62 dependencies = [ 63 + gymnasium 54 64 importlib-resources 55 65 numpy 56 66 typing-extensions ··· 60 70 # Relax the pybind11 version 61 71 '' 62 72 substituteInPlace src/ale/python/CMakeLists.txt \ 63 - --replace-fail 'find_package(pybind11 ''${PYBIND11_VER} QUIET)' 'find_package(pybind11 QUIET)' 73 + --replace-fail \ 74 + 'find_package(pybind11 ''${PYBIND11_VER} QUIET)' \ 75 + 'find_package(pybind11 QUIET)' 76 + '' 77 + + lib.optionalString (!withVectorEnv) '' 78 + substituteInPlace setup.py \ 79 + --replace-fail \ 80 + "-DBUILD_VECTOR_LIB=ON" \ 81 + "-DBUILD_VECTOR_LIB=OFF" 64 82 ''; 65 83 66 84 dontUseCmakeConfigure = true; 67 85 68 86 pythonImportsCheck = [ "ale_py" ]; 69 87 70 - nativeCheckInputs = [ 71 - gymnasium 72 - pytestCheckHook 73 - ]; 88 + doCheck = false; 89 + 90 + nativeCheckInputs = 91 + [ 92 + gymnasium 93 + pytestCheckHook 94 + ] 95 + + lib.optionals withVectorEnv [ 96 + opencv-python 97 + ]; 74 98 75 99 disabledTests = [ 76 100 # Fatal Python error: Aborted ··· 81 105 # The user is expected to manually download the roms: 82 106 # https://github.com/Farama-Foundation/Arcade-Learning-Environment/blob/v0.9.0/docs/faq.md#i-downloaded-ale-and-i-installed-it-successfully-but-i-cannot-find-any-rom-file-at-roms-do-i-have-to-get-them-somewhere-else 83 107 "test_check_env" 108 + "test_reset_step_shapes" 109 + "test_rollout_consistency" 84 110 "test_sound_obs" 85 111 ]; 86 112 ··· 92 118 license = lib.licenses.gpl2; 93 119 maintainers = with lib.maintainers; [ billhuang ]; 94 120 badPlatforms = [ 95 - # fails to link with missing library 121 + # FAILED: src/ale/libale.a 122 + # /bin/sh: CMAKE_CXX_COMPILER_AR-NOTFOUND: command not found 96 123 lib.systems.inspect.patterns.isDarwin 97 124 ]; 98 125 };