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