From 633be57c3928b0080f2aa72ab9a795734c1e03e3 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 6 Sep 2021 16:28:24 +0000 Subject: [PATCH 1/2] python38Packages.xmlschema: 1.7.0 -> 1.7.1 --- pkgs/development/python-modules/xmlschema/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/xmlschema/default.nix b/pkgs/development/python-modules/xmlschema/default.nix index 960dd227388d..b668f247fc09 100644 --- a/pkgs/development/python-modules/xmlschema/default.nix +++ b/pkgs/development/python-modules/xmlschema/default.nix @@ -5,14 +5,14 @@ }: buildPythonPackage rec { - version = "1.7.0"; + version = "1.7.1"; pname = "xmlschema"; src = fetchFromGitHub { owner = "sissaschool"; repo = "xmlschema"; rev = "v${version}"; - sha256 = "0vf0gj1sbv9f7gjm3zbyl0b8pkrn00yzx57ddff0h2kazv8jlpwi"; + sha256 = "124wq44aqzxrh92ylm44rry9dsyb68drgzbhzacrm511n1j0ziww"; }; propagatedBuildInputs = [ elementpath ]; From 61ce506bda30291739c7cd6bca4b5ff07987ed12 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 8 Sep 2021 11:04:35 +0200 Subject: [PATCH 2/2] python3Packages.xmlschema: migrate to pytestCheckHook --- .../python-modules/xmlschema/default.nix | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/xmlschema/default.nix b/pkgs/development/python-modules/xmlschema/default.nix index b668f247fc09..a2bd27d9f1d8 100644 --- a/pkgs/development/python-modules/xmlschema/default.nix +++ b/pkgs/development/python-modules/xmlschema/default.nix @@ -1,13 +1,18 @@ -{ lib, buildPythonPackage, fetchFromGitHub +{ lib +, buildPythonPackage +, fetchFromGitHub , elementpath , lxml -, pytest +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { version = "1.7.1"; pname = "xmlschema"; + disabled = pythonOlder "3.6"; + src = fetchFromGitHub { owner = "sissaschool"; repo = "xmlschema"; @@ -15,20 +20,29 @@ buildPythonPackage rec { sha256 = "124wq44aqzxrh92ylm44rry9dsyb68drgzbhzacrm511n1j0ziww"; }; - propagatedBuildInputs = [ elementpath ]; + propagatedBuildInputs = [ + elementpath + ]; - checkInputs = [ lxml pytest ]; + checkInputs = [ + lxml + pytestCheckHook + ]; # Ignore broken fixtures, and tests for files which don't exist. # For darwin, we need to explicity say we can't reach network - checkPhase = '' - pytest tests \ - --ignore=tests/test_factory.py \ - --ignore=tests/test_schemas.py \ - --ignore=tests/test_memory.py \ - --ignore=tests/test_validation.py \ - -k 'not element_tree_import_script and not export_remote' - ''; + disabledTests = [ + "export_remote" + "element_tree_import_script" + ]; + + disabledTestPaths = [ + "tests/test_schemas.py" + "tests/test_memory.py" + "tests/test_validation.py" + ]; + + pythonImportsCheck = [ "xmlschema" ]; meta = with lib; { description = "XML Schema validator and data conversion library for Python";