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