diff options
Diffstat (limited to 'pkgs/development/python-modules/bayespy/default.nix')
-rw-r--r-- | pkgs/development/python-modules/bayespy/default.nix | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/pkgs/development/python-modules/bayespy/default.nix b/pkgs/development/python-modules/bayespy/default.nix index ef82df7dfb950..7768dd5a8d7c5 100644 --- a/pkgs/development/python-modules/bayespy/default.nix +++ b/pkgs/development/python-modules/bayespy/default.nix @@ -1,30 +1,44 @@ -{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder -, pytestCheckHook, nose, glibcLocales, fetchpatch -, numpy, scipy, matplotlib, h5py }: +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + numpy, + scipy, + h5py, + truncnorm, + pytestCheckHook, +}: buildPythonPackage rec { pname = "bayespy"; version = "0.6.1"; - format = "setuptools"; + pyproject = true; - # Python 2 not supported and not some old Python 3 because MPL doesn't support - # them properly. - disabled = pythonOlder "3.4"; - - src = fetchPypi { - inherit pname version; - sha256 = "sha256-3N8w/LiTLsDZbHp3z26FvDg3vStB2l3XkIWx+Mma1G0="; + src = fetchFromGitHub { + owner = "bayespy"; + repo = "bayespy"; + rev = "refs/tags/${version}"; + hash = "sha256-X7CwJBrKHlU1jqMkt/7XEzaiwul1Yzkb/V64lXG4Aqo="; }; - nativeCheckInputs = [ pytestCheckHook nose glibcLocales ]; + postPatch = '' + substituteInPlace versioneer.py \ + --replace-fail SafeConfigParser ConfigParser \ + --replace-fail readfp read_file + ''; - propagatedBuildInputs = [ numpy scipy matplotlib h5py ]; + build-system = [ setuptools ]; - disabledTests = [ - # Assertion error - "test_message_to_parents" + dependencies = [ + numpy + scipy + h5py + truncnorm ]; + nativeCheckInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "bayespy" ]; meta = with lib; { |