Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / xdoctest / default.nix
blob357e605d853495a8ab185ca23af5ddd401139ab5
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonOlder
5 , setuptools
6 , wheel
7 , pytestCheckHook
8 }:
10 buildPythonPackage rec {
11   pname = "xdoctest";
12   version = "1.1.2";
13   pyproject = true;
15   disabled = pythonOlder "3.6";
17   src = fetchFromGitHub {
18     owner = "Erotemic";
19     repo = "xdoctest";
20     rev = "refs/tags/v${version}";
21     hash = "sha256-yTu5ldr9TkpYRP8hjgUPpexBVLjaK2gfPvISjMJLY74=";
22   };
24   nativeBuildInputs = [
25     setuptools
26     wheel
27   ];
29   nativeCheckInputs = [
30     pytestCheckHook
31   ];
33   preCheck = ''
34     export HOME=$TMPDIR
35     export PATH=$out/bin:$PATH
36   '';
38   pythonImportsCheck = [ "xdoctest" ];
40   meta = with lib; {
41     description = "A rewrite of Python's builtin doctest module (with pytest plugin integration) with AST instead of REGEX";
42     homepage = "https://github.com/Erotemic/xdoctest";
43     changelog = "https://github.com/Erotemic/xdoctest/blob/${src.rev}/CHANGELOG.md";
44     license = licenses.asl20;
45     maintainers = with maintainers; [ natsukium ];
46     mainProgram = "xdoctest";
47   };