3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #46126 from flokli/gmpy-phe

pythonPackages: cleanup gmpy[2], add phe
This commit is contained in:
Sarah Brofeldt 2018-09-06 10:31:56 +02:00 committed by GitHub
commit a59f244b2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 82 additions and 41 deletions

View file

@ -0,0 +1,24 @@
{ buildPythonPackage, fetchurl, isPyPy, gmp } :
let
pname = "gmpy";
version = "1.17";
in
buildPythonPackage {
inherit pname version;
disabled = isPyPy;
src = fetchurl {
url = "mirror://pypi/g/gmpy/${pname}-${version}.zip";
sha256 = "1a79118a5332b40aba6aa24b051ead3a31b9b3b9642288934da754515da8fa14";
};
buildInputs = [ gmp ];
meta = {
description = "GMP or MPIR interface to Python 2.4+ and 3.x";
homepage = http://code.google.com/p/gmpy/;
};
}

View file

@ -0,0 +1,25 @@
{ stdenv, buildPythonPackage, fetchurl, isPyPy, gmp, mpfr, libmpc } :
let
pname = "gmpy2";
version = "2.0.8";
in
buildPythonPackage {
inherit pname version;
disabled = isPyPy;
src = fetchurl {
url = "mirror://pypi/g/gmpy2/${pname}-${version}.zip";
sha256 = "0grx6zmi99iaslm07w6c2aqpnmbkgrxcqjrqpfq223xri0r3w8yx";
};
buildInputs = [ gmp mpfr libmpc ];
meta = with stdenv.lib; {
description = "GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x";
homepage = http://code.google.com/p/gmpy/;
license = licenses.gpl3Plus;
};
}

View file

@ -0,0 +1,29 @@
{ stdenv, buildPythonPackage, fetchPypi, isPyPy, isPy3k, click, gmpy2, numpy } :
let
pname = "phe";
version = "1.4.0";
in
buildPythonPackage {
inherit pname version;
# https://github.com/n1analytics/python-paillier/issues/51
disabled = isPyPy || ! isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "0wzlk7d24kp0f5kpm0kvvc88mm42144f5cg9pcpb1dsfha75qy5m";
};
buildInputs = [ click gmpy2 numpy ];
# 29/233 tests fail
doCheck = false;
meta = with stdenv.lib; {
description = "A library for Partially Homomorphic Encryption in Python";
homepage = https://github.com/n1analytics/python-paillier;
license = licenses.gpl3;
};
}

View file

@ -2624,48 +2624,9 @@ in {
GeoIP = callPackage ../development/python-modules/GeoIP { };
gmpy = buildPythonPackage rec {
name = "gmpy-1.17";
disabled = isPyPy;
gmpy = callPackage ../development/python-modules/gmpy { };
src = pkgs.fetchurl {
url = "mirror://pypi/g/gmpy/${name}.zip";
sha256 = "1a79118a5332b40aba6aa24b051ead3a31b9b3b9642288934da754515da8fa14";
};
buildInputs = [
pkgs.gcc
pkgs.gmp
];
meta = {
description = "GMP or MPIR interface to Python 2.4+ and 3.x";
homepage = http://code.google.com/p/gmpy/;
};
};
gmpy2 = buildPythonPackage rec {
name = "gmpy2-2.0.6";
disabled = isPyPy;
src = pkgs.fetchurl {
url = "mirror://pypi/g/gmpy2/${name}.zip";
sha256 = "5041d0ae24407c24487106099f5bcc4abb1a5f58d90e6712cc95321975eddbd4";
};
buildInputs = [
pkgs.gcc
pkgs.gmp
pkgs.mpfr
pkgs.libmpc
];
meta = {
description = "GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x";
homepage = http://code.google.com/p/gmpy/;
license = licenses.gpl3Plus;
};
};
gmpy2 = callPackage ../development/python-modules/gmpy2 { };
gmusicapi = with pkgs; buildPythonPackage rec {
name = "gmusicapi-10.1.0";
@ -3732,6 +3693,8 @@ in {
};
};
phe = callPackage ../development/python-modules/phe { };
phpserialize = callPackage ../development/python-modules/phpserialize { };
plaid-python = callPackage ../development/python-modules/plaid-python { };