2019-04-15 22:10:47 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2019-04-15 22:12:04 +01:00
|
|
|
, fetchFromGitHub
|
2019-04-15 22:10:47 +01:00
|
|
|
, cython
|
|
|
|
, cmake
|
|
|
|
, symengine
|
2019-04-15 22:12:04 +01:00
|
|
|
, pytest
|
|
|
|
, sympy
|
|
|
|
, python
|
2019-04-15 22:10:47 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "symengine";
|
2021-03-24 17:41:56 +00:00
|
|
|
version = "0.7.0.post3";
|
2019-04-15 22:10:47 +01:00
|
|
|
|
2019-04-15 22:12:04 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "symengine";
|
|
|
|
repo = "symengine.py";
|
|
|
|
rev = "v${version}";
|
2021-03-24 17:41:56 +00:00
|
|
|
sha256 = "1hpwnnv6f7f2wj33zaaj3i2r0d0qj0jwm3fd4ayicj0rvqya50rx";
|
2019-04-15 22:10:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "\"cmake\"" "\"${cmake}/bin/cmake\""
|
|
|
|
|
|
|
|
substituteInPlace cmake/FindCython.cmake \
|
|
|
|
--replace "SET(CYTHON_BIN cython" "SET(CYTHON_BIN ${cython}/bin/cython"
|
|
|
|
'';
|
|
|
|
|
2020-11-26 22:20:50 +00:00
|
|
|
nativeBuildUnputs = [ cmake ];
|
|
|
|
|
|
|
|
buildInputs = [ cython ];
|
2019-04-15 22:10:47 +01:00
|
|
|
|
2019-04-15 22:12:04 +01:00
|
|
|
checkInputs = [ pytest sympy ];
|
|
|
|
|
|
|
|
setupPyBuildFlags = [
|
|
|
|
"--symengine-dir=${symengine}/"
|
|
|
|
"--define=\"CYTHON_BIN=${cython}/bin/cython\""
|
|
|
|
];
|
2019-04-15 22:10:47 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
2019-04-15 22:12:04 +01:00
|
|
|
mkdir empty
|
|
|
|
cd empty
|
|
|
|
${python.interpreter} ../bin/test_python.py
|
2019-04-15 22:10:47 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library providing wrappers to SymEngine";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/symengine/symengine.py";
|
2019-04-15 22:10:47 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|