From ae2b1d7e7f8fc0358035d8920a6fd75fd07355dd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 24 Jan 2022 23:50:16 +0100 Subject: [PATCH] python3Packages.rtoml: ignore DeprecationWarning --- .../python-modules/rtoml/default.nix | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/rtoml/default.nix b/pkgs/development/python-modules/rtoml/default.nix index 9ff43bce0843..2d2aef6f7226 100644 --- a/pkgs/development/python-modules/rtoml/default.nix +++ b/pkgs/development/python-modules/rtoml/default.nix @@ -1,16 +1,17 @@ { lib , buildPythonPackage , fetchFromGitHub -, pythonOlder -, setuptools-rust -, rustPlatform -, pytestCheckHook , libiconv +, pytestCheckHook +, pythonOlder +, rustPlatform +, setuptools-rust }: buildPythonPackage rec { pname = "rtoml"; version = "0.7"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { @@ -33,17 +34,29 @@ buildPythonPackage rec { cargoSetupHook ]; - buildInputs = [ libiconv ]; + buildInputs = [ + libiconv + ]; - pythonImportsCheck = [ "rtoml" ]; + pythonImportsCheck = [ + "rtoml" + ]; + + checkInputs = [ + pytestCheckHook + ]; - checkInputs = [ pytestCheckHook ]; preCheck = '' cd tests ''; + pytestFlagsArray = [ + "-W" + "ignore::DeprecationWarning" + ]; + meta = with lib; { - description = "Rust based TOML library for python"; + description = "Rust based TOML library for Python"; homepage = "https://github.com/samuelcolvin/rtoml"; license = licenses.mit; maintainers = with maintainers; [ evils ];