15 buildPythonPackage rec {
19 build-system = [ setuptools ];
22 src = fetchFromGitHub {
24 repo = "symengine.py";
25 rev = "refs/tags/v${version}";
26 hash = "sha256-uUMcNnynE2itIwc7IGFwxveqLRL8f4dAAcaD6FUWJaY=";
30 SymEngine_DIR = "${symengine}";
34 # Distutils has been removed in python 3.12
35 # See https://github.com/symengine/symengine.py/pull/478
37 name = "no-distutils.patch";
38 url = "https://github.com/symengine/symengine.py/pull/478/commits/e72006d5f7425cd50c54b22766e0ed4bcd2dca85.patch";
39 hash = "sha256-kGJRGkBgxOfI1wf88JwnSztkOYd1wvg62H7wA6CcYEQ=";
44 substituteInPlace setup.py \
45 --replace-fail "'cython>=0.29.24'" "'cython'"
47 export PATH=${cython}/bin:$PATH
50 dontUseCmakeConfigure = true;
51 nativeBuildInputs = [ cmake ];
53 buildInputs = [ cython ];
62 mkdir empty && cd empty
63 ${python.interpreter} ../bin/test_python.py
68 description = "Python library providing wrappers to SymEngine";
69 homepage = "https://github.com/symengine/symengine.py";
70 license = licenses.mit;