depot/third_party/nixpkgs/pkgs/development/python-modules/xdoctest/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

47 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
setuptools,
wheel,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "xdoctest";
version = "1.1.4";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "Erotemic";
repo = "xdoctest";
rev = "refs/tags/v${version}";
hash = "sha256-gKs8HsXm7hskSIw8bhEX1Vo8RbtO0YDjtjBJViz1rCE=";
};
nativeBuildInputs = [
setuptools
wheel
];
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
export HOME=$TMPDIR
export PATH=$out/bin:$PATH
'';
pythonImportsCheck = [ "xdoctest" ];
meta = with lib; {
description = "A 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";
};
}