From 034d6524221748e4323c6166adf4fc3f6b03fa21 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 15 Feb 2021 13:28:01 +0100 Subject: [PATCH] python39Packages.zetup: fix Python 3.9 and switch to pytestCheckHook --- .../python-modules/zetup/default.nix | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/zetup/default.nix b/pkgs/development/python-modules/zetup/default.nix index 85e950b830e8..3862a8e757d1 100644 --- a/pkgs/development/python-modules/zetup/default.nix +++ b/pkgs/development/python-modules/zetup/default.nix @@ -1,6 +1,11 @@ -{ lib, buildPythonPackage, fetchPypi -, setuptools_scm, pathpy, nbconvert -, pytest }: +{ lib +, buildPythonPackage +, fetchPypi +, nbconvert +, pathpy +, pytestCheckHook +, setuptools-scm +}: buildPythonPackage rec { pname = "zetup"; @@ -11,18 +16,25 @@ buildPythonPackage rec { sha256 = "b8a9bdcfa4b705d72b55b218658bc9403c157db7b57a14158253c98d03ab713d"; }; - # Python 3.8 compatibility + # Python > 3.7 compatibility postPatch = '' substituteInPlace zetup/zetup_config.py \ - --replace "'3.7']" "'3.7', '3.8']" + --replace "'3.7']" "'3.7', '3.8', '3.9', '3.10']" ''; checkPhase = '' py.test test -k "not TestObject" --deselect=test/test_zetup_config.py::test_classifiers ''; - checkInputs = [ pytest pathpy nbconvert ]; - propagatedBuildInputs = [ setuptools_scm ]; + propagatedBuildInputs = [ setuptools-scm ]; + + checkInputs = [ + pathpy + nbconvert + pytestCheckHook + ]; + + pythonImportsCheck = [ "zetup" ]; meta = with lib; { description = "Zimmermann's Extensible Tools for Unified Project setups";