depot/third_party/nixpkgs/pkgs/development/python-modules/pyproject-api/default.nix
Default email 83405b6dd2 Project import generated by Copybara.
GitOrigin-RevId: ac718d02867a84b42522a0ece52d841188208f2c
2023-03-15 17:39:30 +01:00

89 lines
1.4 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
# build time
, hatchling
, hatch-vcs
, setuptools-scm
# runtime
, packaging
, toml
, tomli
# docs
, sphinxHook
, furo
, sphinx-autodoc-typehints
# tests
, pytest-mock
, pytestCheckHook
, virtualenv
, wheel
}:
buildPythonPackage rec {
pname = "pyproject-api";
version = "1.5.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "tox-dev";
repo = "pyproject-api";
rev = "refs/tags/${version}";
hash = "sha256-VO+huA9i7uMpCVaWHC29XlfestSu+N9vWWHteY21uqs=";
};
outputs = [
"out"
"doc"
];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
hatchling
hatch-vcs
setuptools-scm
# docs
sphinxHook
furo
sphinx-autodoc-typehints
];
propagatedBuildInputs = [
packaging
] ++ lib.optionals (pythonOlder "3.11") [
tomli
];
nativeCheckInputs = [
pytest-mock
pytestCheckHook
virtualenv
wheel
];
disabledTests = [
# requires eol python2 interpreter
"test_can_build_on_python_2"
];
pythonImportsCheck = [
"pyproject_api"
];
meta = with lib; {
changelog = "https://github.com/tox-dev/pyproject-api/releases/tag/${version}";
description = "API to interact with the python pyproject.toml based projects";
homepage = "https://github.com/tox-dev/pyproject-api";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}