summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-03-08 13:10:53 +0100
committerGitHub <noreply@github.com>2022-03-08 13:10:53 +0100
commitc69ce893afcfd9969f9b1fa9c02ecad64b0ebd57 (patch)
tree0523a37bc58d40b50e2c5e7c44eb24f0d3687317
parent8e265a5818d67473b492f7c473780b52a7d2b087 (diff)
parentdd24ce20a29ecae154324d6568f0e520f9373a47 (diff)
downloadnixpkgs-c69ce893afcfd9969f9b1fa9c02ecad64b0ebd57.tar
nixpkgs-c69ce893afcfd9969f9b1fa9c02ecad64b0ebd57.tar.gz
nixpkgs-c69ce893afcfd9969f9b1fa9c02ecad64b0ebd57.tar.bz2
nixpkgs-c69ce893afcfd9969f9b1fa9c02ecad64b0ebd57.tar.lz
nixpkgs-c69ce893afcfd9969f9b1fa9c02ecad64b0ebd57.tar.xz
nixpkgs-c69ce893afcfd9969f9b1fa9c02ecad64b0ebd57.tar.zst
nixpkgs-c69ce893afcfd9969f9b1fa9c02ecad64b0ebd57.zip
Merge pull request #161947 from nidabdella/fix/python-pymc3
-rw-r--r--maintainers/maintainer-list.nix6
-rw-r--r--pkgs/development/python-modules/pymc3/default.nix21
-rw-r--r--pkgs/development/python-modules/theano-pymc/default.nix48
-rw-r--r--pkgs/top-level/python-packages.nix2
4 files changed, 65 insertions, 12 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 52e87c914c6..7dea8e39cc5 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -8822,6 +8822,12 @@
     githubId = 8214542;
     name = "Nicolò Balzarotti";
   };
+  nidabdella = {
+    name = "Mohamed Nidabdella";
+    email = "nidabdella.mohamed@gmail.com";
+    github = "nidabdella";
+    githubId = 8083813;
+  };
   NieDzejkob = {
     email = "kuba@kadziolka.net";
     github = "NieDzejkob";
diff --git a/pkgs/development/python-modules/pymc3/default.nix b/pkgs/development/python-modules/pymc3/default.nix
index 5cf2615ed03..7c1e46647e3 100644
--- a/pkgs/development/python-modules/pymc3/default.nix
+++ b/pkgs/development/python-modules/pymc3/default.nix
@@ -2,10 +2,11 @@
 , fetchPypi
 , buildPythonPackage
 , pythonOlder
-, Theano
+, theano-pymc
 , pandas
 , patsy
 , joblib
+, cachetools
 , tqdm
 , six
 , h5py
@@ -16,6 +17,8 @@
 , parameterized
 , fastprogress
 , typing-extensions
+, dill
+, semver
 }:
 
 buildPythonPackage rec {
@@ -34,7 +37,6 @@ buildPythonPackage rec {
   '';
 
   propagatedBuildInputs = [
-    Theano
     pandas
     patsy
     joblib
@@ -45,12 +47,10 @@ buildPythonPackage rec {
     packaging
     fastprogress
     typing-extensions
-  ];
-
-  checkInputs = [
-    pytest
-    nose
-    parameterized
+    dill
+    theano-pymc
+    cachetools
+    semver
   ];
 
   # The test suite is computationally intensive and test failures are not
@@ -67,9 +67,6 @@ buildPythonPackage rec {
     description = "Bayesian estimation, particularly using Markov chain Monte Carlo (MCMC)";
     homepage = "https://github.com/pymc-devs/pymc3";
     license = lib.licenses.asl20;
-    maintainers = with lib.maintainers; [ ilya-kolpakov ];
-    # several dependencies are not declared and in the end it requires theano-pymc3
-    # instead of Theano. The former is currently not packaged.
-    broken = true;
+    maintainers = with lib.maintainers; [ nidabdella ];
   };
 }
diff --git a/pkgs/development/python-modules/theano-pymc/default.nix b/pkgs/development/python-modules/theano-pymc/default.nix
new file mode 100644
index 00000000000..ad0b93fe094
--- /dev/null
+++ b/pkgs/development/python-modules/theano-pymc/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, fetchPypi
+, buildPythonPackage
+, pythonOlder
+, pandas
+, numpy
+, scipy
+, filelock
+, pytest
+, nose
+, parameterized
+}:
+
+buildPythonPackage rec {
+  pname = "theano-pymc";
+  version = "1.1.2";
+  disabled = pythonOlder "3.6";
+
+  src = fetchPypi {
+    pname = "Theano-PyMC";
+    inherit version;
+    sha256 = "5da6c2242ea72a991c8446d7fe7d35189ea346ef7d024c890397011114bf10fc";
+  };
+
+  # No need for coverage stats in Nix builds
+  postPatch = ''
+    substituteInPlace setup.py --replace ", 'pytest-cov'" ""
+  '';
+
+  propagatedBuildInputs = [
+    pandas
+    numpy
+    scipy
+    filelock
+  ];
+
+  # The test suite is computationally intensive and test failures are not
+  # indicative for package usability hence tests are disabled by default.
+  doCheck = false;
+  pythonImportsCheck = [ "theano" ];
+
+  meta = {
+    description = "PyMC theano fork";
+    homepage = "https://github.com/majidaldo/Theano-PyMC";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ nidabdella ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 7c08ff24e72..1802cbb5691 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -9904,6 +9904,8 @@ in {
 
   tgcrypto = callPackage ../development/python-modules/tgcrypto { };
 
+  theano-pymc = callPackage ../development/python-modules/theano-pymc { };
+
   Theano = callPackage ../development/python-modules/Theano rec {
     cudaSupport = pkgs.config.cudaSupport or false;
     cudnnSupport = cudaSupport;