Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 67 lines 1.4 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}: 18 19buildPythonPackage rec { 20 pname = "pymc3"; 21 version = "3.9.3"; 22 disabled = pythonOlder "3.5"; 23 24 src = fetchPypi { 25 inherit pname version; 26 sha256 = "abe046f5a5d0e5baee80b7c4bc0a4c218f61b517b62d77be4f89cf4784c27d78"; 27 }; 28 29 # No need for coverage stats in Nix builds 30 postPatch = '' 31 substituteInPlace setup.py --replace ", 'pytest-cov'" "" 32 ''; 33 34 propagatedBuildInputs = [ 35 Theano 36 pandas 37 patsy 38 joblib 39 tqdm 40 six 41 h5py 42 arviz 43 packaging 44 ]; 45 46 checkInputs = [ 47 pytest 48 nose 49 parameterized 50 ]; 51 52 # The test suite is computationally intensive and test failures are not 53 # indicative for package usability hence tests are disabled by default. 54 doCheck = false; 55 56 # For some reason tests are run as a part of the *install* phase if enabled. 57 # Theano writes compiled code to ~/.theano hence we set $HOME. 58 preInstall = "export HOME=$(mktemp -d)"; 59 postInstall = "rm -rf $HOME"; 60 61 meta = { 62 description = "Bayesian estimation, particularly using Markov chain Monte Carlo (MCMC)"; 63 homepage = "https://github.com/pymc-devs/pymc3"; 64 license = lib.licenses.asl20; 65 maintainers = with lib.maintainers; [ ilya-kolpakov ]; 66 }; 67}