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
, 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";