2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
numpy,
|
|
|
|
scipy,
|
|
|
|
h5py,
|
|
|
|
truncnorm,
|
|
|
|
pytestCheckHook,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bayespy";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.6.1";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Python 2 not supported and not some old Python 3 because MPL doesn't support
|
|
|
|
# them properly.
|
|
|
|
disabled = pythonOlder "3.4";
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bayespy";
|
|
|
|
repo = "bayespy";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-X7CwJBrKHlU1jqMkt/7XEzaiwul1Yzkb/V64lXG4Aqo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace versioneer.py \
|
|
|
|
--replace-fail SafeConfigParser ConfigParser \
|
|
|
|
--replace-fail readfp read_file
|
|
|
|
'';
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
h5py
|
|
|
|
truncnorm
|
2022-07-14 12:49:19 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
pythonImportsCheck = [ "bayespy" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.bayespy.org";
|
|
|
|
description = "Variational Bayesian inference tools for Python";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jluttine ];
|
|
|
|
};
|
|
|
|
}
|