depot/third_party/nixpkgs/pkgs/development/python-modules/pdm-backend/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

58 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
# propagates
, importlib-metadata
# tests
, editables
, git
, pytestCheckHook
, setuptools
}:
buildPythonPackage rec {
pname = "pdm-backend";
version = "2.1.8";
format = "pyproject";
src = fetchFromGitHub {
owner = "pdm-project";
repo = "pdm-backend";
rev = "refs/tags/${version}";
hash = "sha256-d8i+FvxNFPM18W7NmOwh9bqZnMUenF7eCPdcCw4BT7s=";
};
env.PDM_BUILD_SCM_VERSION = version;
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [
importlib-metadata
];
pythonImportsCheck = [
"pdm.backend"
];
nativeCheckInputs = [
editables
git
pytestCheckHook
setuptools
];
preCheck = ''
unset PDM_BUILD_SCM_VERSION
'';
setupHook = ./setup-hook.sh;
meta = with lib; {
homepage = "https://github.com/pdm-project/pdm-backend";
changelog = "https://github.com/pdm-project/pdm-backend/releases/tag/${version}";
description = "Yet another PEP 517 backend.";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}