forked from mirrors/nixpkgs
numexpr: new package, version 2.4
Description from the numexpr project page [1]: > Numexpr is a fast numerical expression evaluator for NumPy. With it, > expressions that operate on arrays (like "3*a+4*b") are accelerated and use > less memory than doing the same calculation in Python. I am adding it, because it is a dependency of the pytables package. [1]: https://github.com/pydata/numexpr
This commit is contained in:
parent
2eea864503
commit
9ae6cc5967
|
@ -4601,6 +4601,43 @@ rec {
|
|||
};
|
||||
};
|
||||
|
||||
numexpr = buildPythonPackage rec {
|
||||
version = "2.4";
|
||||
name = "numexpr-${version}";
|
||||
|
||||
src = fetchgit {
|
||||
url = https://github.com/pydata/numexpr.git;
|
||||
rev = "606cc9a110711e947d35ac2770749c00dab184c8";
|
||||
sha256 = "1gxgkg7ncgjhnifn444iha5nrjhyr8sr6w5yp204186a1ysz858g";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with pkgs; [ numpy ];
|
||||
|
||||
# Run the test suite.
|
||||
# It requires the build path to be in the python search path.
|
||||
checkPhase = ''
|
||||
${python}/bin/${python.executable} <<EOF
|
||||
import sysconfig
|
||||
import sys
|
||||
import os
|
||||
f = "lib.{platform}-{version[0]}.{version[1]}"
|
||||
lib = f.format(platform=sysconfig.get_platform(),
|
||||
version=sys.version_info)
|
||||
build = os.path.join(os.getcwd(), 'build', lib)
|
||||
sys.path.insert(0, build)
|
||||
import numexpr
|
||||
r = numexpr.test()
|
||||
if not r.wasSuccessful():
|
||||
sys.exit(1)
|
||||
EOF
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Fast numerical array expression evaluator for NumPy";
|
||||
homepage = "https://github.com/pydata/numexpr";
|
||||
};
|
||||
};
|
||||
|
||||
numpy = buildPythonPackage ( rec {
|
||||
name = "numpy-1.7.1";
|
||||
|
||||
|
|
Loading…
Reference in a new issue