From 8b8b0394e699cd2b19dabfc393635354bc2dfc2b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 22 Jun 2024 17:35:12 +0200 Subject: [PATCH] python311Packages.rtoml: 0.8 -> 0.10 https://github.com/samuelcolvin/rtoml/compare/v0.8...v0.10 --- .../python-modules/rtoml/default.nix | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/rtoml/default.nix b/pkgs/development/python-modules/rtoml/default.nix index 0f4fe3a9966f..fe83ca2e32dc 100644 --- a/pkgs/development/python-modules/rtoml/default.nix +++ b/pkgs/development/python-modules/rtoml/default.nix @@ -1,20 +1,19 @@ { lib, buildPythonPackage, - cargo, fetchFromGitHub, libiconv, + dirty-equals, + pytest-benchmark, pytestCheckHook, pythonOlder, rustPlatform, - rustc, - setuptools-rust, }: buildPythonPackage rec { pname = "rtoml"; - version = "0.8"; - format = "setuptools"; + version = "0.10"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -22,30 +21,39 @@ buildPythonPackage rec { owner = "samuelcolvin"; repo = pname; rev = "v${version}"; - hash = "sha256-tvX4KcQGw0khBjEXVFmkhsVyAkdr2Bgm6IfD1yGZ37c="; + hash = "sha256-1movtKMQkQ6PEpKpSkK0Oy4AV0ee7XrS0P9m6QwZTaM="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-KcF3Z71S7ZNZicViqwpClfT736nYYbKcKWylOP+S3HI="; + hash = "sha256-BWcOIZMl4yHxxKxCn6Qh69MlMdz3REp3izN0A1eFX3o="; }; - nativeBuildInputs = with rustPlatform; [ - setuptools-rust - rustc - cargo - rustPlatform.cargoSetupHook + build-system = with rustPlatform; [ + cargoSetupHook + maturinBuildHook ]; buildInputs = [ libiconv ]; pythonImportsCheck = [ "rtoml" ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + dirty-equals + pytest-benchmark + pytestCheckHook + ]; + + pytestFlagsArray = [ "--benchmark-disable" ]; + + disabledTests = [ + # TypeError: loads() got an unexpected keyword argument 'name' + "test_load_data_toml" + ]; preCheck = '' - cd tests + rm -rf rtoml ''; meta = with lib; {