1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5 6# build time 7, hatchling 8, hatch-vcs 9 10# runtime 11, packaging 12, toml 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.6.1"; 31 format = "pyproject"; 32 33 disabled = pythonOlder "3.8"; 34 35 src = fetchFromGitHub { 36 owner = "tox-dev"; 37 repo = "pyproject-api"; 38 rev = "refs/tags/${version}"; 39 hash = "sha256-XQD+36NP2zKUp/QRlgKhwzfMYBh6GVlCYXURXs2qeO8="; 40 }; 41 42 outputs = [ 43 "out" 44 "doc" 45 ]; 46 47 env.SETUPTOOLS_SCM_PRETEND_VERSION = version; 48 49 nativeBuildInputs = [ 50 hatchling 51 hatch-vcs 52 53 # docs 54 sphinxHook 55 furo 56 sphinx-autodoc-typehints 57 ]; 58 59 propagatedBuildInputs = [ 60 packaging 61 ] ++ lib.optionals (pythonOlder "3.11") [ 62 tomli 63 ]; 64 65 nativeCheckInputs = [ 66 pytest-mock 67 pytestCheckHook 68 setuptools 69 virtualenv 70 wheel 71 ]; 72 73 disabledTests = [ 74 # requires eol python2 interpreter 75 "test_can_build_on_python_2" 76 ]; 77 78 pythonImportsCheck = [ 79 "pyproject_api" 80 ]; 81 82 meta = with lib; { 83 changelog = "https://github.com/tox-dev/pyproject-api/releases/tag/${version}"; 84 description = "API to interact with the python pyproject.toml based projects"; 85 homepage = "https://github.com/tox-dev/pyproject-api"; 86 license = licenses.mit; 87 maintainers = with maintainers; [ ]; 88 }; 89}