nixpkgs/pkgs/development/python-modules/pymc3/default.nix

64 lines
1.3 KiB
Nix
Raw Normal View History

2018-04-28 21:06:12 +02:00
{ lib
, fetchPypi
, buildPythonPackage
, pythonOlder
, Theano
, pandas
, patsy
, joblib
, tqdm
, six
, h5py
, pytest
, nose
, parameterized
}:
buildPythonPackage rec {
pname = "pymc3";
2019-02-14 08:37:26 +01:00
version = "3.6";
2018-04-28 21:06:12 +02:00
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
2019-02-14 08:37:26 +01:00
sha256 = "c00c0778d2451a348a9508f8b956fe280a0f9affd3f85140ac3948bc2902f5e9";
2018-04-28 21:06:12 +02:00
};
# No need for coverage stats in Nix builds
postPatch = ''
substituteInPlace setup.py --replace ", 'pytest-cov'" ""
'';
propagatedBuildInputs = [
Theano
pandas
patsy
joblib
tqdm
six
h5py
];
checkInputs = [
pytest
nose
parameterized
];
# The test suite is computationally intensive and test failures are not
# indicative for package usability hence tests are disabled by default.
doCheck = false;
# For some reason tests are run as a part of the *install* phase if enabled.
# Theano writes compiled code to ~/.theano hence we set $HOME.
preInstall = "export HOME=$(mktemp -d)";
postInstall = "rm -rf $HOME";
meta = {
description = "Bayesian estimation, particularly using Markov chain Monte Carlo (MCMC)";
2018-06-30 02:18:27 +02:00
homepage = https://github.com/pymc-devs/pymc3;
2018-04-28 21:06:12 +02:00
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ ilya-kolpakov ];
};
}