about summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2019-04-18 22:50:45 +0200
committerGitHub <noreply@github.com>2019-04-18 22:50:45 +0200
commit0fdd79d0dd3875ee8b02e200afc1305fbaa5b5fd (patch)
tree7704c70284b8ac70444d6e1421df9a3fac701da6 /pkgs/development/python-modules
parent1e7af9f9aea0f3de66f60e834922f17541155f51 (diff)
parent49b8efcb841fd8f4896f1ac83e7ee672e82a18cf (diff)
downloadnixlib-0fdd79d0dd3875ee8b02e200afc1305fbaa5b5fd.tar
nixlib-0fdd79d0dd3875ee8b02e200afc1305fbaa5b5fd.tar.gz
nixlib-0fdd79d0dd3875ee8b02e200afc1305fbaa5b5fd.tar.bz2
nixlib-0fdd79d0dd3875ee8b02e200afc1305fbaa5b5fd.tar.lz
nixlib-0fdd79d0dd3875ee8b02e200afc1305fbaa5b5fd.tar.xz
nixlib-0fdd79d0dd3875ee8b02e200afc1305fbaa5b5fd.tar.zst
nixlib-0fdd79d0dd3875ee8b02e200afc1305fbaa5b5fd.zip
Merge pull request #54690 from timokau/sage-8.7
sage: 8.6 -> 8.7
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/cysignals/default.nix9
-rw-r--r--pkgs/development/python-modules/gmpy2/default.nix19
-rw-r--r--pkgs/development/python-modules/pplpy/default.nix64
3 files changed, 83 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/cysignals/default.nix b/pkgs/development/python-modules/cysignals/default.nix
index c1f85ce75ac4..1cd55acdbeb8 100644
--- a/pkgs/development/python-modules/cysignals/default.nix
+++ b/pkgs/development/python-modules/cysignals/default.nix
@@ -31,12 +31,13 @@ buildPythonPackage rec {
     export PATH="$out/bin:$PATH"
   '';
 
-  buildInputs = lib.optionals pariSupport [
-    pari
-  ];
-
   propagatedBuildInputs = [
     cython
+  ] ++ lib.optionals pariSupport [
+    # When cysignals is built with pari, including cysignals into the
+    # buildInputs of another python package will cause cython to link against
+    # pari.
+    pari
   ];
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/python-modules/gmpy2/default.nix b/pkgs/development/python-modules/gmpy2/default.nix
index a03188bb8f2c..edca1d30d8ee 100644
--- a/pkgs/development/python-modules/gmpy2/default.nix
+++ b/pkgs/development/python-modules/gmpy2/default.nix
@@ -1,8 +1,15 @@
-{ stdenv, buildPythonPackage, fetchurl, isPyPy, gmp, mpfr, libmpc } :
+{ stdenv
+, buildPythonPackage
+, fetchFromGitHub
+, isPyPy
+, gmp
+, mpfr
+, libmpc
+}:
 
 let
   pname = "gmpy2";
-  version = "2.0.8";
+  version = "2.1a4";
 in
 
 buildPythonPackage {
@@ -10,9 +17,11 @@ buildPythonPackage {
 
   disabled = isPyPy;
 
-  src = fetchurl {
-    url = "mirror://pypi/g/gmpy2/${pname}-${version}.zip";
-    sha256 = "0grx6zmi99iaslm07w6c2aqpnmbkgrxcqjrqpfq223xri0r3w8yx";
+  src = fetchFromGitHub {
+    owner = "aleaxit";
+    repo = "gmpy";
+    rev = "gmpy2-${version}";
+    sha256 = "1wg4w4q2l7n26ksrdh4rwqmifgfm32n7x29cgdvmmbv5lmilb5hz";
   };
 
   buildInputs = [ gmp mpfr libmpc ];
diff --git a/pkgs/development/python-modules/pplpy/default.nix b/pkgs/development/python-modules/pplpy/default.nix
new file mode 100644
index 000000000000..6f118a51c879
--- /dev/null
+++ b/pkgs/development/python-modules/pplpy/default.nix
@@ -0,0 +1,64 @@
+{ lib
+, python
+, fetchPypi
+, buildPythonPackage
+, gmp
+, mpfr
+, libmpc
+, ppl
+, pari
+, cython
+, cysignals
+, gmpy2
+, sphinx
+}:
+
+buildPythonPackage rec {
+  pname = "pplpy";
+  version = "0.8.4";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0dk8l5r3f2jbkkasddvxwvhlq35pjsiirh801lrapv8lb16r2qmr";
+  };
+
+  buildInputs = [
+    gmp
+    mpfr
+    libmpc
+    ppl
+  ];
+
+  nativeBuildInputs = [
+    sphinx # docbuild, called by make
+  ];
+
+  propagatedBuildInputs = [
+    cython
+    cysignals
+    gmpy2
+  ];
+
+  outputs = [ "out" "doc" ];
+
+  postBuild = ''
+    # Find the build result in order to put it into PYTHONPATH. The doc
+    # build needs to import pplpy.
+    build_result="$PWD/$( find build/ -type d -name 'lib.*' | head -n1 )"
+
+    echo "Building documentation"
+    PYTHONPATH="$build_result:$PYTHONPATH" make -C docs html
+  '';
+
+  postInstall = ''
+    mkdir -p "$doc/share/doc"
+    mv docs/build/html "$doc/share/doc/pplpy"
+  '';
+
+  meta = with lib; {
+    description = "A Python wrapper for ppl";
+    homepage = https://gitlab.com/videlec/pplpy;
+    maintainers = with maintainers; [ timokau ];
+    license = licenses.gpl3;
+  };
+}