bcb2f287e1
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
47 lines
1 KiB
Nix
47 lines
1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
setuptools,
|
|
wheel,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "xdoctest";
|
|
version = "1.1.5";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Erotemic";
|
|
repo = "xdoctest";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-lC4xX5V5iasQdR4tkLEvtMe/OjSp6+A7D2QGX6TFY4E=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
wheel
|
|
];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
preCheck = ''
|
|
export HOME=$TMPDIR
|
|
export PATH=$out/bin:$PATH
|
|
'';
|
|
|
|
pythonImportsCheck = [ "xdoctest" ];
|
|
|
|
meta = with lib; {
|
|
description = "Rewrite of Python's builtin doctest module (with pytest plugin integration) with AST instead of REGEX";
|
|
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";
|
|
};
|
|
}
|