at 22.05-pre 1.5 kB view raw
1{ lib 2, fetchPypi 3, buildPythonPackage 4, pythonOlder 5, Theano 6, pandas 7, patsy 8, joblib 9, tqdm 10, six 11, h5py 12, arviz 13, packaging 14, pytest 15, nose 16, parameterized 17, fastprogress 18, typing-extensions 19}: 20 21buildPythonPackage rec { 22 pname = "pymc3"; 23 version = "3.11.4"; 24 disabled = pythonOlder "3.5"; 25 26 src = fetchPypi { 27 inherit pname version; 28 sha256 = "3b88d1e6c85f7fb8a9b99d6f136ac860672170370ec4146338fdd160c3b3fd3f"; 29 }; 30 31 # No need for coverage stats in Nix builds 32 postPatch = '' 33 substituteInPlace setup.py --replace ", 'pytest-cov'" "" 34 ''; 35 36 propagatedBuildInputs = [ 37 Theano 38 pandas 39 patsy 40 joblib 41 tqdm 42 six 43 h5py 44 arviz 45 packaging 46 fastprogress 47 typing-extensions 48 ]; 49 50 checkInputs = [ 51 pytest 52 nose 53 parameterized 54 ]; 55 56 # The test suite is computationally intensive and test failures are not 57 # indicative for package usability hence tests are disabled by default. 58 doCheck = false; 59 pythonImportsCheck = [ "pymc3" ]; 60 61 # For some reason tests are run as a part of the *install* phase if enabled. 62 # Theano writes compiled code to ~/.theano hence we set $HOME. 63 preInstall = "export HOME=$(mktemp -d)"; 64 postInstall = "rm -rf $HOME"; 65 66 meta = { 67 description = "Bayesian estimation, particularly using Markov chain Monte Carlo (MCMC)"; 68 homepage = "https://github.com/pymc-devs/pymc3"; 69 license = lib.licenses.asl20; 70 maintainers = with lib.maintainers; [ ilya-kolpakov ]; 71 }; 72}