1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 # build time
8 hatchling,
9 hatch-vcs,
10
11 # runtime
12 packaging,
13 tomli,
14
15 # docs
16 sphinxHook,
17 furo,
18 sphinx-autodoc-typehints,
19
20 # tests
21 pytest-mock,
22 pytestCheckHook,
23 setuptools,
24 virtualenv,
25 wheel,
26}:
27
28buildPythonPackage rec {
29 pname = "pyproject-api";
30 version = "1.9.1";
31 format = "pyproject";
32
33 disabled = pythonOlder "3.8";
34
35 src = fetchFromGitHub {
36 owner = "tox-dev";
37 repo = "pyproject-api";
38 tag = version;
39 hash = "sha256-Bf/FG5BNKbV3lfebEHFJ3cy80L1mWTYLXJfqPUzeNXc=";
40 };
41
42 outputs = [
43 "out"
44 "doc"
45 ];
46
47 nativeBuildInputs = [
48 hatchling
49 hatch-vcs
50
51 # docs
52 sphinxHook
53 furo
54 sphinx-autodoc-typehints
55 ];
56
57 propagatedBuildInputs = [ packaging ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
58
59 nativeCheckInputs = [
60 pytest-mock
61 pytestCheckHook
62 setuptools
63 virtualenv
64 wheel
65 ];
66
67 disabledTests = [
68 # requires eol python2 interpreter
69 "test_can_build_on_python_2"
70 # different formatting for version specifier
71 "test_setuptools_prepare_metadata_for_build_wheel"
72 ];
73
74 pythonImportsCheck = [ "pyproject_api" ];
75
76 meta = with lib; {
77 changelog = "https://github.com/tox-dev/pyproject-api/releases/tag/${version}";
78 description = "API to interact with the python pyproject.toml based projects";
79 homepage = "https://github.com/tox-dev/pyproject-api";
80 license = licenses.mit;
81 maintainers = [ ];
82 };
83}