2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
2024-09-19 14:19:46 +00:00
|
|
|
stdenv,
|
2024-06-05 15:53:02 +00:00
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2024-09-19 14:19:46 +00:00
|
|
|
nix-update-script,
|
|
|
|
setuptools,
|
|
|
|
paup,
|
|
|
|
paupIntegration ? false,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
let
|
|
|
|
paupPath = if paupIntegration then lib.getExe paup else "NONE";
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "dendropy";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "5.0.2";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
pyproject = true;
|
|
|
|
build-system = [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jeetsukumaran";
|
2024-09-19 14:19:46 +00:00
|
|
|
repo = "dendropy";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-OiFei/6226FDtL4w1XrXL2OVn3/hfQwnIhTzM4OneKc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '["pytest-runner"],' '[],'
|
|
|
|
|
|
|
|
substituteInPlace src/dendropy/interop/paup.py \
|
|
|
|
--replace 'PAUP_PATH = os.environ.get(metavar.DENDROPY_PAUP_PATH_ENVAR, "paup")' 'PAUP_PATH = os.environ.get(metavar.DENDROPY_PAUP_PATH_ENVAR, "${paupPath}")'
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "dendropy" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = {
|
2021-05-20 23:08:51 +00:00
|
|
|
description = "Python library for phylogenetic computing";
|
2024-09-19 14:19:46 +00:00
|
|
|
homepage = "https://jeetsukumaran.github.io/DendroPy/";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
unode
|
|
|
|
pandapip1
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|