summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-02-25 14:30:33 +0100
committerGitHub <noreply@github.com>2022-02-25 14:30:33 +0100
commitad8e86d72fb37e0d13024bdbfcb59fd51e94c286 (patch)
tree6997a581d98412931ca23aea260bcbd44eeb8693
parent9e2debc5272a0312b468669061348865a049e51d (diff)
parentc2deb7a921f29a3583eaf7b3b535ef0f86913b51 (diff)
downloadnixpkgs-ad8e86d72fb37e0d13024bdbfcb59fd51e94c286.tar
nixpkgs-ad8e86d72fb37e0d13024bdbfcb59fd51e94c286.tar.gz
nixpkgs-ad8e86d72fb37e0d13024bdbfcb59fd51e94c286.tar.bz2
nixpkgs-ad8e86d72fb37e0d13024bdbfcb59fd51e94c286.tar.lz
nixpkgs-ad8e86d72fb37e0d13024bdbfcb59fd51e94c286.tar.xz
nixpkgs-ad8e86d72fb37e0d13024bdbfcb59fd51e94c286.tar.zst
nixpkgs-ad8e86d72fb37e0d13024bdbfcb59fd51e94c286.zip
Merge pull request #160155 from Etjean/python-aesara
-rw-r--r--pkgs/development/python-modules/aesara/default.nix65
-rw-r--r--pkgs/development/python-modules/cons/default.nix43
-rw-r--r--pkgs/development/python-modules/etuples/default.nix45
-rw-r--r--pkgs/development/python-modules/logical-unification/default.nix48
-rw-r--r--pkgs/development/python-modules/minikanren/default.nix51
-rw-r--r--pkgs/development/python-modules/numba-scipy/default.nix40
-rw-r--r--pkgs/top-level/python-packages.nix12
7 files changed, 304 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/aesara/default.nix b/pkgs/development/python-modules/aesara/default.nix
new file mode 100644
index 00000000000..3e2e9cb2cf3
--- /dev/null
+++ b/pkgs/development/python-modules/aesara/default.nix
@@ -0,0 +1,65 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, numpy
+, scipy
+, filelock
+, etuples
+, logical-unification
+, minikanren
+, cons
+, numba
+, numba-scipy
+, libgpuarray
+, sympy
+, cython
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "aesara";
+  version = "2.4.0";
+
+  src = fetchFromGitHub {
+    owner = "aesara-devs";
+    repo = "aesara";
+    rev = "38d7a813646c1e350170c46bafade0e7d0e2427c";
+    sha256 = "sha256-933bM15BZi4sTjnIOGAg5dc5tXVWQ9lFzktOtzj5DNQ=";
+  };
+
+  nativeBuildInputs = [
+    cython
+  ];
+
+  propagatedBuildInputs = [
+    numpy
+    scipy
+    filelock
+    etuples
+    logical-unification
+    minikanren
+    cons
+    numba
+    numba-scipy
+    libgpuarray
+    sympy
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  preBuild = ''
+    export HOME=$(mktemp -d)
+  '';
+
+  pythonImportsCheck = [ "aesara" ];
+
+  meta = with lib; {
+    description = "Python library to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays";
+    homepage = "https://github.com/aesara-devs/aesara";
+    changelog = "https://github.com/aesara-devs/aesara/releases";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ Etjean ];
+  };
+}
diff --git a/pkgs/development/python-modules/cons/default.nix b/pkgs/development/python-modules/cons/default.nix
new file mode 100644
index 00000000000..2977051d87b
--- /dev/null
+++ b/pkgs/development/python-modules/cons/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, logical-unification
+, pytestCheckHook
+, pytest-html
+}:
+
+buildPythonPackage rec {
+  pname = "cons";
+  version = "0.4.5";
+
+  src = fetchFromGitHub {
+    owner = "pythological";
+    repo = "python-cons";
+    rev = "fbeedfc8a3d1bff4ba179d492155cdd55538365e";
+    sha256 = "sha256-ivHFep9iYPvyiBIZKMAzqrLGnQkeuxd0meYMZwZFFH0=";
+  };
+
+  propagatedBuildInputs = [
+    logical-unification
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    pytest-html
+  ];
+
+  pytestFlagsArray = [
+    "--html=testing-report.html"
+    "--self-contained-html"
+  ];
+
+  pythonImportsCheck = [ "cons" ];
+
+  meta = with lib; {
+    description = "An implementation of Lisp/Scheme-like cons in Python";
+    homepage = "https://github.com/pythological/python-cons";
+    changelog = "https://github.com/pythological/python-cons/releases";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ Etjean ];
+  };
+}
diff --git a/pkgs/development/python-modules/etuples/default.nix b/pkgs/development/python-modules/etuples/default.nix
new file mode 100644
index 00000000000..bfb4552732b
--- /dev/null
+++ b/pkgs/development/python-modules/etuples/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, cons
+, multipledispatch
+, pytestCheckHook
+, pytest-html
+}:
+
+buildPythonPackage rec {
+  pname = "etuples";
+  version = "0.3.4";
+
+  src = fetchFromGitHub {
+    owner = "pythological";
+    repo = "etuples";
+    rev = "35d760ceb64ec318f302a6e4d3a4a80feda97a9e";
+    sha256 = "sha256-CXD8MhsdWYAcG5WDVTT/A2HDtiO1xfQbrwlYVnxXpBU=";
+  };
+
+  propagatedBuildInputs = [
+    cons
+    multipledispatch
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    pytest-html
+  ];
+
+  pytestFlagsArray = [
+    "--html=testing-report.html"
+    "--self-contained-html"
+  ];
+
+  pythonImportsCheck = [ "etuples" ];
+
+  meta = with lib; {
+    description = "Python S-expression emulation using tuple-like objects";
+    homepage = "https://github.com/pythological/etuples";
+    changelog = "https://github.com/pythological/etuples/releases";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ Etjean ];
+  };
+}
diff --git a/pkgs/development/python-modules/logical-unification/default.nix b/pkgs/development/python-modules/logical-unification/default.nix
new file mode 100644
index 00000000000..b89fcb25339
--- /dev/null
+++ b/pkgs/development/python-modules/logical-unification/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, toolz
+, multipledispatch
+, pytestCheckHook
+, pytest-html
+, pytest-benchmark
+}:
+
+buildPythonPackage rec {
+  pname = "logical-unification";
+  version = "0.4.5";
+
+  src = fetchFromGitHub {
+    owner = "pythological";
+    repo = "unification";
+    rev = "707cf4a39e27a4a8bf06b7e7dce7223085574e65";
+    sha256 = "sha256-3wqO0pWWFRQeoGNvbSDdLNYFyjNnv+O++F7+vTBUJoI=";
+  };
+
+  propagatedBuildInputs = [
+    toolz
+    multipledispatch
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    pytest-html
+    pytest-benchmark  # Needed for the `--benchmark-skip` flag
+  ];
+
+  pytestFlagsArray = [
+    "--benchmark-skip"
+    "--html=testing-report.html"
+    "--self-contained-html"
+  ];
+
+  pythonImportsCheck = [ "unification" ];
+
+  meta = with lib; {
+    description = "Straightforward unification in Python that's extensible via generic functions";
+    homepage = "https://github.com/pythological/unification";
+    changelog = "https://github.com/pythological/unification/releases";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ Etjean ];
+  };
+}
diff --git a/pkgs/development/python-modules/minikanren/default.nix b/pkgs/development/python-modules/minikanren/default.nix
new file mode 100644
index 00000000000..7452148e8e4
--- /dev/null
+++ b/pkgs/development/python-modules/minikanren/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, toolz
+, cons
+, multipledispatch
+, etuples
+, logical-unification
+, pytestCheckHook
+, pytest-html
+}:
+
+buildPythonPackage rec {
+  pname = "minikanren";
+  version = "1.0.3";
+
+  src = fetchFromGitHub {
+    owner = "pythological";
+    repo = "kanren";
+    rev = "5aa9b1734cbb3fe072a7c72b46e1b72a174d28ac";
+    sha256 = "sha256-daAtREgm91634Q0mc0/WZivDiyZHC7TIRoGRo8hMnGE=";
+  };
+
+  propagatedBuildInputs = [
+    toolz
+    cons
+    multipledispatch
+    etuples
+    logical-unification
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    pytest-html
+  ];
+
+  pytestFlagsArray = [
+    "--html=testing-report.html"
+    "--self-contained-html"
+  ];
+
+  pythonImportsCheck = [ "kanren" ];
+
+  meta = with lib; {
+    description = "Relational programming in Python";
+    homepage = "https://github.com/pythological/kanren";
+    changelog = "https://github.com/pythological/kanren/releases";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ Etjean ];
+  };
+}
diff --git a/pkgs/development/python-modules/numba-scipy/default.nix b/pkgs/development/python-modules/numba-scipy/default.nix
new file mode 100644
index 00000000000..c8f84cbf43f
--- /dev/null
+++ b/pkgs/development/python-modules/numba-scipy/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, scipy
+, numba
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "numba-scipy";
+  version = "0.3.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "sha256-qJeoWiG1LdtFB9cME1d8xVaC0BXGDJEYjCOEdHvSkmQ=";
+  };
+
+  propagatedBuildInputs = [
+    scipy
+    numba
+  ];
+
+  postPatch = ''
+    substituteInPlace setup.py --replace "scipy>=0.16,<=1.6.2" "scipy>=0.16,<=1.7.3"
+  '';
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [ "numba" ];
+
+  meta = with lib; {
+    description = "Extends Numba to make it aware of SciPy";
+    homepage = "https://github.com/numba/numba-scipy";
+    changelog = "https://github.com/numba/numba-scipy/blob/master/CHANGE_LOG";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ Etjean ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index a7f59aea3b4..fb8e01485e8 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -222,6 +222,8 @@ in {
 
   aenum = callPackage ../development/python-modules/aenum { };
 
+  aesara = callPackage ../development/python-modules/aesara { };
+
   afdko = callPackage ../development/python-modules/afdko { };
 
   affine = callPackage ../development/python-modules/affine { };
@@ -1825,6 +1827,8 @@ in {
 
   connexion = callPackage ../development/python-modules/connexion { };
 
+  cons = callPackage ../development/python-modules/cons { };
+
   consonance = callPackage ../development/python-modules/consonance { };
 
   constantly = callPackage ../development/python-modules/constantly { };
@@ -2679,6 +2683,8 @@ in {
 
   eth-utils = callPackage ../development/python-modules/eth-utils { };
 
+  etuples = callPackage ../development/python-modules/etuples { };
+
   et_xmlfile = callPackage ../development/python-modules/et_xmlfile { };
 
   ev3dev2 = callPackage ../development/python-modules/ev3dev2 { };
@@ -4799,6 +4805,8 @@ in {
 
   logfury = callPackage ../development/python-modules/logfury { };
 
+  logical-unification = callPackage ../development/python-modules/logical-unification { };
+
   logilab_astng = callPackage ../development/python-modules/logilab_astng { };
 
   logilab_common = callPackage ../development/python-modules/logilab/common.nix { };
@@ -5094,6 +5102,8 @@ in {
 
   minidump = callPackage ../development/python-modules/minidump { };
 
+  minikanren = callPackage ../development/python-modules/minikanren { };
+
   minikerberos = callPackage ../development/python-modules/minikerberos { };
 
   minimock = callPackage ../development/python-modules/minimock { };
@@ -5596,6 +5606,8 @@ in {
 
   numba = callPackage ../development/python-modules/numba { };
 
+  numba-scipy = callPackage ../development/python-modules/numba-scipy { };
+
   numcodecs = callPackage ../development/python-modules/numcodecs { };
 
   numericalunits = callPackage ../development/python-modules/numericalunits { };