2023-03-15 16:39:30 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
# propagates
|
|
|
|
, importlib-metadata
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, editables
|
|
|
|
, git
|
|
|
|
, pytestCheckHook
|
|
|
|
, setuptools
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pdm-backend";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.1.6";
|
2023-03-15 16:39:30 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pdm-project";
|
|
|
|
repo = "pdm-backend";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-ZEci8VeKYuORs9iAzaEqrtVBh9fMWHlLsFH1e5PRLwA=";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
env.PDM_BUILD_SCM_VERSION = version;
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pdm.backend"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
editables
|
|
|
|
git
|
|
|
|
pytestCheckHook
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
preCheck = ''
|
|
|
|
unset PDM_BUILD_SCM_VERSION
|
|
|
|
'';
|
|
|
|
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|