2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
wheel,
|
|
|
|
pytestCheckHook,
|
2023-11-16 04:20:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xdoctest";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.2.0";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Erotemic";
|
|
|
|
repo = "xdoctest";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-1c3wnQ30J2OfnBffzGfPPt9St8VpLGmFGbifzbw+cOc=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
export PATH=$out/bin:$PATH
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "xdoctest" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Rewrite of Python's builtin doctest module (with pytest plugin integration) with AST instead of REGEX";
|
2023-11-16 04:20:00 +00:00
|
|
|
homepage = "https://github.com/Erotemic/xdoctest";
|
|
|
|
changelog = "https://github.com/Erotemic/xdoctest/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ natsukium ];
|
|
|
|
mainProgram = "xdoctest";
|
|
|
|
};
|
|
|
|
}
|