nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 72 lines 1.5 kB view raw
1{ lib 2, fetchPypi 3, buildPythonPackage 4, pythonOlder 5, theano-pymc 6, pandas 7, patsy 8, joblib 9, cachetools 10, tqdm 11, six 12, h5py 13, arviz 14, packaging 15, pytest 16, nose 17, parameterized 18, fastprogress 19, typing-extensions 20, dill 21, semver 22}: 23 24buildPythonPackage rec { 25 pname = "pymc3"; 26 version = "3.11.5"; 27 disabled = pythonOlder "3.5"; 28 29 src = fetchPypi { 30 inherit pname version; 31 sha256 = "sha256-M0HLvZYpCROLfV6+TtfP7in0Cy/nyt64iLOda7wXE4w="; 32 }; 33 34 # No need for coverage stats in Nix builds 35 postPatch = '' 36 substituteInPlace setup.py --replace ", 'pytest-cov'" "" 37 ''; 38 39 propagatedBuildInputs = [ 40 pandas 41 patsy 42 joblib 43 tqdm 44 six 45 h5py 46 arviz 47 packaging 48 fastprogress 49 typing-extensions 50 dill 51 theano-pymc 52 cachetools 53 semver 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; [ nidabdella ]; 71 }; 72}