python310Packages.nodeenv: enable tests

- disable on older Python releases
This commit is contained in:
Fabian Affolter 2022-06-27 08:51:55 +02:00 committed by Jonathan Ringer
parent e4c7b303df
commit a0aea1e6c3

View file

@ -1,31 +1,55 @@
{ lib, buildPythonPackage, fetchPypi, setuptools, python, which }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, mock
, pytestCheckHook
, python
, pythonOlder
, setuptools
, which
}:
buildPythonPackage rec {
pname = "nodeenv";
version = "1.7.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-4Of337hfxTlMb+Ho+pgTGiRz4EMRpFr7ZQj3zxg2+is=";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ekalinin";
repo = pname;
rev = version;
hash = "sha256-X30PUiOMT/vXqmdSJKHTNNA8aLWavCUaKa7LzqkdLrk=";
};
propagatedBuildInputs = [
setuptools
];
# Tests not included in PyPI tarball
doCheck = false;
checkInputs = [
mock
pytestCheckHook
];
preFixup = ''
substituteInPlace $out/${python.sitePackages}/nodeenv.py \
--replace '["which", candidate]' '["${lib.getBin which}/bin/which", candidate]'
'';
pythonImportsCheck = [ "nodeenv" ];
pythonImportsCheck = [
"nodeenv"
];
disabledTests = [
# Test requires coverage
"test_smoke"
];
meta = with lib; {
description = "Node.js virtual environment builder";
homepage = "https://github.com/ekalinin/nodeenv";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};
}