tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python312Packages.gmpy2: 2.1.2 -> 2.2.0a2, refactor, adopt
TomaSajt
2 years ago
f91cd16b
9f7053ff
+56
-25
1 changed file
expand all
collapse all
unified
split
pkgs
development
python-modules
gmpy2
default.nix
+56
-25
pkgs/development/python-modules/gmpy2/default.nix
···
1
1
-
{ lib
2
2
-
, buildPythonPackage
3
3
-
, fetchFromGitHub
4
4
-
, isPyPy
5
5
-
, gmp
6
6
-
, mpfr
7
7
-
, libmpc
8
8
-
9
9
-
# Reverse dependency
10
10
-
, sage
1
1
+
{
2
2
+
lib,
3
3
+
stdenv,
4
4
+
buildPythonPackage,
5
5
+
fetchFromGitHub,
6
6
+
isPyPy,
7
7
+
pythonOlder,
8
8
+
setuptools,
9
9
+
gmp,
10
10
+
mpfr,
11
11
+
libmpc,
12
12
+
pytestCheckHook,
13
13
+
hypothesis,
14
14
+
cython,
15
15
+
mpmath,
16
16
+
# Reverse dependency
17
17
+
sage,
11
18
}:
12
19
13
13
-
let
20
20
+
buildPythonPackage rec {
14
21
pname = "gmpy2";
15
15
-
version = "2.1.2";
16
16
-
format = "setuptools";
17
17
-
in
18
18
-
19
19
-
buildPythonPackage {
20
20
-
inherit pname version;
22
22
+
version = "2.2.0a2";
23
23
+
pyproject = true;
21
24
22
22
-
disabled = isPyPy;
25
25
+
disabled = isPyPy || pythonOlder "3.7";
23
26
24
27
src = fetchFromGitHub {
25
28
owner = "aleaxit";
26
29
repo = "gmpy";
27
27
-
rev = "gmpy2-${version}";
28
28
-
hash = "sha256-ARCttNzRA+Ji2j2NYaSCDXgvoEg01T9BnYadyqON2o0=";
30
30
+
rev = "refs/tags/gmpy2-${version}";
31
31
+
hash = "sha256-luLEDEY1cezhzZo4fXmM/MUg2YyAaz7n0HwSpbNayP8=";
29
32
};
30
33
31
31
-
buildInputs = [ gmp mpfr libmpc ];
34
34
+
build-system = [ setuptools ];
35
35
+
36
36
+
buildInputs = [
37
37
+
gmp
38
38
+
mpfr
39
39
+
libmpc
40
40
+
];
41
41
+
42
42
+
# make relative imports in tests work properly
43
43
+
preCheck = ''
44
44
+
rm gmpy2 -r
45
45
+
'';
46
46
+
47
47
+
nativeCheckInputs = [
48
48
+
pytestCheckHook
49
49
+
hypothesis
50
50
+
cython
51
51
+
mpmath
52
52
+
];
53
53
+
54
54
+
disabledTests = lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
55
55
+
# issue with some overflow logic
56
56
+
"test_mpz_to_bytes"
57
57
+
"test_mpz_from_bytes"
58
58
+
];
32
59
33
60
pythonImportsCheck = [ "gmpy2" ];
34
61
35
35
-
passthru.tests = { inherit sage; };
62
62
+
passthru.tests = {
63
63
+
inherit sage;
64
64
+
};
36
65
37
37
-
meta = with lib; {
38
38
-
description = "GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x";
66
66
+
meta = {
67
67
+
changelog = "https://github.com/aleaxit/gmpy/blob/${src.rev}/docs/history.rst";
68
68
+
description = "Interface to GMP, MPFR, and MPC for Python 3.7+";
39
69
homepage = "https://github.com/aleaxit/gmpy/";
40
40
-
license = licenses.gpl3Plus;
70
70
+
license = lib.licenses.lgpl3Plus;
71
71
+
maintainers = with lib.maintainers; [ tomasajt ];
41
72
};
42
73
}