python39Packages.zetup: fix Python 3.9 and switch to pytestCheckHook

This commit is contained in:
Fabian Affolter 2021-02-15 13:28:01 +01:00
parent 6524e84b4f
commit 034d652422

View File

@ -1,6 +1,11 @@
{ lib, buildPythonPackage, fetchPypi { lib
, setuptools_scm, pathpy, nbconvert , buildPythonPackage
, pytest }: , fetchPypi
, nbconvert
, pathpy
, pytestCheckHook
, setuptools-scm
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "zetup"; pname = "zetup";
@ -11,18 +16,25 @@ buildPythonPackage rec {
sha256 = "b8a9bdcfa4b705d72b55b218658bc9403c157db7b57a14158253c98d03ab713d"; sha256 = "b8a9bdcfa4b705d72b55b218658bc9403c157db7b57a14158253c98d03ab713d";
}; };
# Python 3.8 compatibility # Python > 3.7 compatibility
postPatch = '' postPatch = ''
substituteInPlace zetup/zetup_config.py \ substituteInPlace zetup/zetup_config.py \
--replace "'3.7']" "'3.7', '3.8']" --replace "'3.7']" "'3.7', '3.8', '3.9', '3.10']"
''; '';
checkPhase = '' checkPhase = ''
py.test test -k "not TestObject" --deselect=test/test_zetup_config.py::test_classifiers 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; { meta = with lib; {
description = "Zimmermann's Extensible Tools for Unified Project setups"; description = "Zimmermann's Extensible Tools for Unified Project setups";