python3Packages.skrl: cleanup, fix

This commit is contained in:
Gaetan Lepage 2026-03-07 00:55:58 +00:00
parent 04f9a5f5c4
commit c2f1b88ee8

View file

@ -2,18 +2,30 @@
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
gym,
gymnasium,
torch,
packaging,
tensorboard,
torch,
tqdm,
wandb,
packaging,
# tests
flax,
jax,
optax,
pettingzoo,
pygame,
pymunk,
pytestCheckHook,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "skrl";
version = "1.4.3";
pyproject = true;
@ -21,49 +33,49 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "Toni-SM";
repo = "skrl";
tag = version;
tag = finalAttrs.version;
hash = "sha256-5lkoYAmMIWqK3+E3WxXMWS9zal2DhZkfl30EkrHKpdI=";
};
nativeBuildInputs = [ setuptools ];
build-system = [ setuptools ];
propagatedBuildInputs = [
dependencies = [
gym
gymnasium
torch
packaging
tensorboard
torch
tqdm
wandb
packaging
];
nativeCheckInputs = [ pytestCheckHook ];
doCheck = torch.cudaSupport;
pythonImportsCheck = [ "skrl" ];
pythonImportsCheck = [
"skrl"
"skrl.agents"
"skrl.agents.torch"
"skrl.envs"
"skrl.envs.torch"
"skrl.models"
"skrl.models.torch"
"skrl.resources"
"skrl.resources.noises"
"skrl.resources.noises.torch"
"skrl.resources.schedulers"
"skrl.resources.schedulers.torch"
"skrl.trainers"
"skrl.trainers.torch"
"skrl.utils"
"skrl.utils.model_instantiators"
nativeCheckInputs = [
flax
jax
optax
pettingzoo
pygame
pymunk
pytestCheckHook
];
disabledTests = [
# TypeError: The array passed to from_dlpack must have __dlpack__ and __dlpack_device__ methods
"test_env"
"test_multi_agent_env"
# OverflowError
"test_key"
];
meta = {
description = "Reinforcement learning library using PyTorch focusing on readability and simplicity";
changelog = "https://github.com/Toni-SM/skrl/releases/tag/${version}";
homepage = "https://skrl.readthedocs.io";
downloadPage = "https://github.com/Toni-SM/skrl";
changelog = "https://github.com/Toni-SM/skrl/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ bcdarwin ];
};
}
})