pythonPackages.symengine: init at 0.3.0
This commit is contained in:
parent
9f2bea9304
commit
9833f556f7
38
pkgs/development/libraries/symengine/default.nix
Normal file
38
pkgs/development/libraries/symengine/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, gmp
|
||||
, flint
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "symengine-${version}";
|
||||
version = "0.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "symengine";
|
||||
repo = "symengine";
|
||||
rev = "v${version}";
|
||||
sha256 = "1p7hk163rgn1zzvjlq4vskblry3s2rg5bc7xlr08wfqckfr47bqc";
|
||||
};
|
||||
|
||||
buildInputs = [ cmake gmp flint ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DWITH_FLINT=ON"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
ctest
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "SymEngine is a fast symbolic manipulation library";
|
||||
homepage = https://github.com/symengine/symengine;
|
||||
platforms = platforms.unix ++ platforms.windows;
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.costrouc ];
|
||||
};
|
||||
|
||||
}
|
|
@ -1,19 +1,23 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchFromGitHub
|
||||
, cython
|
||||
, cmake
|
||||
, symengine
|
||||
, nose
|
||||
, pytest
|
||||
, sympy
|
||||
, python
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "symengine";
|
||||
version = "0.3.0";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "e86d13aadc9f765f2c5462da32950edd36d1a0a52dbfc96e766be3689957c04d";
|
||||
src = fetchFromGitHub {
|
||||
owner = "symengine";
|
||||
repo = "symengine.py";
|
||||
rev = "v${version}";
|
||||
sha256 = "07i9rwxphi4zgwc7y6f6qvq73iym2cx4k1bpd7rmd3wkpgrrfxqx";
|
||||
};
|
||||
|
||||
postConfigure = ''
|
||||
|
@ -26,12 +30,17 @@ buildPythonPackage rec {
|
|||
|
||||
buildInputs = [ cython cmake ];
|
||||
|
||||
setupPyBuildFlags = [ "--symengine-dir=${symengine}/" ];
|
||||
checkInputs = [ pytest sympy ];
|
||||
|
||||
setupPyBuildFlags = [
|
||||
"--symengine-dir=${symengine}/"
|
||||
"--define=\"CYTHON_BIN=${cython}/bin/cython\""
|
||||
];
|
||||
|
||||
# tests fail due to trying to import local "symengine" directory
|
||||
doCheck = false;
|
||||
checkPhase = ''
|
||||
nosetests symengine/tests -v
|
||||
mkdir empty
|
||||
cd empty
|
||||
${python.interpreter} ../bin/test_python.py
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -4607,6 +4607,10 @@ in {
|
|||
|
||||
python-vagrant = callPackage ../development/python-modules/python-vagrant { };
|
||||
|
||||
symengine = callPackage ../development/python-modules/symengine {
|
||||
symengine = pkgs.symengine;
|
||||
};
|
||||
|
||||
sympy = callPackage ../development/python-modules/sympy { };
|
||||
|
||||
pilkit = callPackage ../development/python-modules/pilkit { };
|
||||
|
|
Loading…
Reference in a new issue