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 ninja, 10 pybind11, 11 setuptools, 12 - wheel, 13 14 # buildInputs 15 SDL2, 16 zlib, 17 18 # dependencies ··· 22 23 # tests 24 gymnasium, 25 pytestCheckHook, 26 }: 27 28 buildPythonPackage rec { 29 pname = "ale-py"; 30 - version = "0.10.2"; 31 pyproject = true; 32 33 src = fetchFromGitHub { 34 owner = "Farama-Foundation"; 35 repo = "Arcade-Learning-Environment"; 36 tag = "v${version}"; 37 - hash = "sha256-CGUlQFQoQZqs+Jd3IU/o50VwX+tEHrs3KHrcVWahEpo="; 38 }; 39 40 build-system = [ ··· 42 ninja 43 pybind11 44 setuptools 45 - wheel 46 ]; 47 48 - buildInputs = [ 49 - SDL2 50 - zlib 51 - ]; 52 53 dependencies = [ 54 importlib-resources 55 numpy 56 typing-extensions ··· 60 # Relax the pybind11 version 61 '' 62 substituteInPlace src/ale/python/CMakeLists.txt \ 63 - --replace-fail 'find_package(pybind11 ''${PYBIND11_VER} QUIET)' 'find_package(pybind11 QUIET)' 64 ''; 65 66 dontUseCmakeConfigure = true; 67 68 pythonImportsCheck = [ "ale_py" ]; 69 70 - nativeCheckInputs = [ 71 - gymnasium 72 - pytestCheckHook 73 - ]; 74 75 disabledTests = [ 76 # Fatal Python error: Aborted ··· 81 # The user is expected to manually download the roms: 82 # 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 "test_check_env" 84 "test_sound_obs" 85 ]; 86 ··· 92 license = lib.licenses.gpl2; 93 maintainers = with lib.maintainers; [ billhuang ]; 94 badPlatforms = [ 95 - # fails to link with missing library 96 lib.systems.inspect.patterns.isDarwin 97 ]; 98 };
··· 9 ninja, 10 pybind11, 11 setuptools, 12 13 # buildInputs 14 SDL2, 15 + opencv, 16 zlib, 17 18 # dependencies ··· 22 23 # tests 24 gymnasium, 25 + opencv-python, 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, 32 }: 33 34 buildPythonPackage rec { 35 pname = "ale-py"; 36 + version = "0.11.0"; 37 pyproject = true; 38 39 src = fetchFromGitHub { 40 owner = "Farama-Foundation"; 41 repo = "Arcade-Learning-Environment"; 42 tag = "v${version}"; 43 + hash = "sha256-RgFVpbjJp54FncQzFtdZM7p/1GBMsQ2HvLgIoaokiQc="; 44 }; 45 46 build-system = [ ··· 48 ninja 49 pybind11 50 setuptools 51 ]; 52 53 + buildInputs = 54 + [ 55 + SDL2 56 + zlib 57 + ] 58 + ++ lib.optionals withVectorEnv [ 59 + opencv 60 + ]; 61 62 dependencies = [ 63 + gymnasium 64 importlib-resources 65 numpy 66 typing-extensions ··· 70 # Relax the pybind11 version 71 '' 72 substituteInPlace src/ale/python/CMakeLists.txt \ 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" 82 ''; 83 84 dontUseCmakeConfigure = true; 85 86 pythonImportsCheck = [ "ale_py" ]; 87 88 + doCheck = false; 89 + 90 + nativeCheckInputs = 91 + [ 92 + gymnasium 93 + pytestCheckHook 94 + ] 95 + + lib.optionals withVectorEnv [ 96 + opencv-python 97 + ]; 98 99 disabledTests = [ 100 # Fatal Python error: Aborted ··· 105 # The user is expected to manually download the roms: 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 107 "test_check_env" 108 + "test_reset_step_shapes" 109 + "test_rollout_consistency" 110 "test_sound_obs" 111 ]; 112 ··· 118 license = lib.licenses.gpl2; 119 maintainers = with lib.maintainers; [ billhuang ]; 120 badPlatforms = [ 121 + # FAILED: src/ale/libale.a 122 + # /bin/sh: CMAKE_CXX_COMPILER_AR-NOTFOUND: command not found 123 lib.systems.inspect.patterns.isDarwin 124 ]; 125 };