1{
2 lib,
3 buildPythonPackage,
4 cython,
5 fetchpatch,
6 fetchPypi,
7 gmpy2,
8 mpmath,
9 numpy,
10 pythonOlder,
11 scipy,
12 setuptools-scm,
13 wheel,
14}:
15
16buildPythonPackage rec {
17 pname = "diofant";
18 version = "0.14.0";
19 format = "pyproject";
20 disabled = pythonOlder "3.10";
21
22 src = fetchPypi {
23 inherit version;
24 pname = "Diofant";
25 hash = "sha256-c886y37xR+4TxZw9+3tb7nkTGxWcS+Ag/ruUUdpf7S4=";
26 };
27
28 patches = [
29 (fetchpatch {
30 name = "remove-pip-from-build-dependencies.patch";
31 url = "https://github.com/diofant/diofant/commit/117e441808faa7c785ccb81bf211772d60ebdec3.patch";
32 hash = "sha256-MYk1Ku4F3hAv7+jJQLWhXd8qyKRX+QYuBzPfYWT0VbU=";
33 })
34 ];
35
36 nativeBuildInputs = [
37 setuptools-scm
38 wheel
39 ];
40
41 propagatedBuildInputs = [ mpmath ];
42
43 passthru.optional-dependencies = {
44 exports = [
45 cython
46 numpy
47 scipy
48 ];
49 gmpy = [ gmpy2 ];
50 };
51
52 # tests take ~1h
53 doCheck = false;
54
55 pythonImportsCheck = [ "diofant" ];
56
57 meta = with lib; {
58 description = "Python CAS library";
59 homepage = "https://diofant.readthedocs.io/";
60 license = licenses.bsd3;
61 maintainers = with maintainers; [ suhr ];
62 };
63}