Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pkgs/development/python-modules/cysignals/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
42 changes: 42 additions & 0 deletions pkgs/development/python-modules/pplpy/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{ lib
, fetchPypi
, buildPythonPackage
, gmp
, mpfr
, libmpc
, ppl
, pari
, cython
, cysignals
, gmpy2_2_1
}:

buildPythonPackage rec {
pname = "pplpy";
version = "0.8.4";

src = fetchPypi {
inherit pname version;
sha256 = "0dk8l5r3f2jbkkasddvxwvhlq35pjsiirh801lrapv8lb16r2qmr";
};

buildInputs = [
gmp
mpfr
libmpc
ppl
];

propagatedBuildInputs = [
cython
cysignals
gmpy2_2_1
];

meta = with lib; {
description = "A Python wrapper for ppl";
homepage = https://gitlab.com/videlec/pplpy;
maintainers = with maintainers; [ timokau ];
license = licenses.gpl3;
};
}
14 changes: 14 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,8 @@ in {

poetry = callPackage ../development/python-modules/poetry { };

pplpy = callPackage ../development/python-modules/pplpy { };

pprintpp = callPackage ../development/python-modules/pprintpp { };

progress = callPackage ../development/python-modules/progress { };
Expand Down Expand Up @@ -1877,6 +1879,18 @@ in {

gmpy2 = callPackage ../development/python-modules/gmpy2 { };

# alpha release, big refactor, adds cython support
# see https://github.com/aleaxit/gmpy/issues/146, https://github.com/aleaxit/gmpy/issues/199
gmpy2_2_1 = (callPackage ../development/python-modules/gmpy2 {}).overridePythonAttrs (oldAttrs: rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't do that for Python packages because having different versions of the same package in $PYTHONPATH is not supported. You could upgrade the default gmpy2 instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, I don't see a specific version requirement for gmpy2 in pplpy's setup.py.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Their readme specifies

gmpy2: version 2.1.0a4 from sources

There is a beta release coming probably soonish (gmpy2/gmpy2#199), so maybe upgrading after that makes sense.

(I meant to ping you in the PR, not domenkozar. Damn autocomplete)

version = "2.1a4";
src = pkgs.fetchFromGitHub {
owner = "aleaxit";
repo = "gmpy";
rev = "gmpy2-${version}";
sha256 = "1wg4w4q2l7n26ksrdh4rwqmifgfm32n7x29cgdvmmbv5lmilb5hz";
};
});

gmusicapi = callPackage ../development/python-modules/gmusicapi { };

gnureadline = callPackage ../development/python-modules/gnureadline { };
Expand Down