From 4622ddb9cbb2015b840bed2b94affd9e37b5757d Mon Sep 17 00:00:00 2001 From: Dennis Date: Sun, 23 Feb 2025 15:39:27 +0100 Subject: [PATCH] rlcard: patch distutils --- pkgs/development/python-modules/rlcard/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/rlcard/default.nix b/pkgs/development/python-modules/rlcard/default.nix index f6333964b3de..bd92e40b5983 100644 --- a/pkgs/development/python-modules/rlcard/default.nix +++ b/pkgs/development/python-modules/rlcard/default.nix @@ -9,7 +9,7 @@ termcolor, pytestCheckHook, torch, - pythonAtLeast, + fetchpatch2, }: buildPythonPackage rec { @@ -24,6 +24,16 @@ buildPythonPackage rec { hash = "sha256-SWj6DBItQzSM+nioV54a350Li7tbBaVXsQxNAqVgB0k="; }; + patches = [ + # Remove distutils to make it compatible with Python 3.12 + # https://github.com/datamllab/rlcard/pull/323 + (fetchpatch2 { + name = "remove-distutils.patch"; + url = "https://github.com/datamllab/rlcard/commit/e44378157aaf229ffe2aaef9fafe500c2844045e.patch"; + hash = "sha256-aQS4d9ETj6pDv26G77mC+0xHQMA2hjspAxtAyz0rA6Y="; + }) + ]; + build-system = [ setuptools wheel @@ -70,7 +80,5 @@ buildPythonPackage rec { changelog = "https://github.com/datamllab/rlcard/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ GaetanLepage ]; - # Relies on deprecated distutils - broken = pythonAtLeast "3.12"; }; }