From 8a67aa85343fbacb073bb61184f47d035d9a6051 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 1 Aug 2024 13:03:45 +0200 Subject: [PATCH] python312Packages.ale-py: 0.9.0 -> 0.9.1 Diff: https://github.com/Farama-Foundation/Arcade-Learning-Environment/compare/refs/tags/v0.9.0...v0.9.1 Changelog: https://github.com/Farama-Foundation/Arcade-Learning-Environment/releases/tag/v0.9.1 --- .../ale-py/cmake-pybind11.patch | 18 ----------- .../python-modules/ale-py/default.nix | 32 ++++++++++++------- 2 files changed, 21 insertions(+), 29 deletions(-) delete mode 100644 pkgs/development/python-modules/ale-py/cmake-pybind11.patch diff --git a/pkgs/development/python-modules/ale-py/cmake-pybind11.patch b/pkgs/development/python-modules/ale-py/cmake-pybind11.patch deleted file mode 100644 index 5bcf5b1d9b2f..000000000000 --- a/pkgs/development/python-modules/ale-py/cmake-pybind11.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt -index 911e280..d484943 100644 ---- a/src/python/CMakeLists.txt -+++ b/src/python/CMakeLists.txt -@@ -1,12 +1,6 @@ - find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED) - --include(FetchContent) --FetchContent_Declare( -- pybind11 -- GIT_REPOSITORY https://github.com/pybind/pybind11 -- GIT_TAG v2.10.0) --FetchContent_MakeAvailable(pybind11) -- -+find_package(pybind11 REQUIRED) - add_library(ale-py MODULE ale_python_interface.cpp) - # Depend on the ALE and pybind11 module - target_link_libraries(ale-py PUBLIC ale ale-lib) diff --git a/pkgs/development/python-modules/ale-py/default.nix b/pkgs/development/python-modules/ale-py/default.nix index 14c3e7b939a6..cdf2363a52f1 100644 --- a/pkgs/development/python-modules/ale-py/default.nix +++ b/pkgs/development/python-modules/ale-py/default.nix @@ -3,25 +3,34 @@ buildPythonPackage, pythonOlder, fetchFromGitHub, + + # build-system cmake, ninja, pybind11, setuptools, wheel, + + # buildInputs SDL2, zlib, + + # dependencies importlib-resources, numpy, typing-extensions, importlib-metadata, + + # checks gymnasium, pytestCheckHook, + stdenv, }: buildPythonPackage rec { pname = "ale-py"; - version = "0.9.0"; + version = "0.9.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -30,14 +39,9 @@ buildPythonPackage rec { owner = "Farama-Foundation"; repo = "Arcade-Learning-Environment"; rev = "refs/tags/v${version}"; - hash = "sha256-obZfNQ0+ppnq/BD4IFeMFAqJnCVV3X/2HeRwbdSKRFk="; + hash = "sha256-MpumAQ5OW/+fRIvrBlRWkgioxMVceb5LxEH2JjRk5zY="; }; - patches = [ - # don't download pybind11, use local pybind11 - ./cmake-pybind11.patch - ]; - build-system = [ cmake ninja @@ -57,10 +61,16 @@ buildPythonPackage rec { typing-extensions ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail 'dynamic = ["version"]' 'version = "${version}"' - ''; + postPatch = + # Relax the pybind11 version + '' + substituteInPlace src/python/CMakeLists.txt \ + --replace-fail 'find_package(pybind11 ''${PYBIND11_VER} QUIET)' 'find_package(pybind11 QUIET)' + '' + + '' + substituteInPlace pyproject.toml \ + --replace-fail 'dynamic = ["version"]' 'version = "${version}"' + ''; dontUseCmakeConfigure = true;