Resurrect pandas 0.17.1
This commit is contained in:
parent
75bd873547
commit
96874c6e71
56
pkgs/development/python-modules/scipy/0.17.1.nix
Normal file
56
pkgs/development/python-modules/scipy/0.17.1.nix
Normal file
@ -0,0 +1,56 @@
|
||||
{lib, fetchurl, python, buildPythonPackage, isPyPy, gfortran, nose, numpy}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "scipy";
|
||||
version = "0.17.1";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/s/scipy/scipy-${version}.tar.gz";
|
||||
sha256 = "1b1qpfz2j2rvmlplsjbnznnxnqr9ckbmis506110ii1w07wd4k4w";
|
||||
};
|
||||
|
||||
buildInputs = [ gfortran nose numpy.blas ];
|
||||
propagatedBuildInputs = [ numpy ];
|
||||
|
||||
# Remove tests because of broken wrapper
|
||||
prePatch = ''
|
||||
rm scipy/linalg/tests/test_lapack.py
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
sed -i '0,/from numpy.distutils.core/s//import setuptools;from numpy.distutils.core/' setup.py
|
||||
export NPY_NUM_BUILD_JOBS=$NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
echo "Creating site.cfg file..."
|
||||
cat << EOF > site.cfg
|
||||
[openblas]
|
||||
include_dirs = ${numpy.blas}/include
|
||||
library_dirs = ${numpy.blas}/lib
|
||||
EOF
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
pushd dist
|
||||
${python.interpreter} -c 'import scipy; scipy.test("fast", verbose=10)'
|
||||
popd
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
blas = numpy.blas;
|
||||
};
|
||||
|
||||
setupPyBuildFlags = [ "--fcompiler='gnu95'" ];
|
||||
|
||||
meta = {
|
||||
description = "SciPy (pronounced 'Sigh Pie') is open-source software for mathematics, science, and engineering. ";
|
||||
homepage = http://www.scipy.org/;
|
||||
maintainers = with lib.maintainers; [ fridh ];
|
||||
};
|
||||
}
|
@ -14990,6 +14990,59 @@ in {
|
||||
|
||||
pandas = callPackage ../development/python-modules/pandas { };
|
||||
|
||||
pandas_17 = let
|
||||
inherit (pkgs.stdenv.lib) optional optionalString;
|
||||
inherit (pkgs.stdenv) isDarwin;
|
||||
in buildPythonPackage rec {
|
||||
name = "pandas-${version}";
|
||||
version = "0.17.1";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://pypi.python.org/packages/source/p/pandas/${name}.tar.gz";
|
||||
sha256 = "cfd7214a7223703fe6999fbe34837749540efee1c985e6aee9933f30e3f72837";
|
||||
};
|
||||
|
||||
buildInputs = with self; [ nose ] ++ optional isDarwin pkgs.libcxx;
|
||||
propagatedBuildInputs = with self; [
|
||||
dateutil
|
||||
scipy_0_17
|
||||
numexpr
|
||||
pytz
|
||||
xlrd
|
||||
bottleneck
|
||||
sqlalchemy
|
||||
lxml
|
||||
html5lib
|
||||
# modules.sqlite3
|
||||
beautifulsoup4
|
||||
] ++ optional isDarwin pkgs.darwin.locale; # provides the locale command
|
||||
|
||||
# For OSX, we need to add a dependency on libcxx, which provides
|
||||
# `complex.h` and other libraries that pandas depends on to build.
|
||||
patchPhase = optionalString isDarwin ''
|
||||
cpp_sdk="${pkgs.libcxx}/include/c++/v1";
|
||||
echo "Adding $cpp_sdk to the setup.py common_include variable"
|
||||
substituteInPlace setup.py \
|
||||
--replace "['pandas/src/klib', 'pandas/src']" \
|
||||
"['pandas/src/klib', 'pandas/src', '$cpp_sdk']"
|
||||
|
||||
# disable clipboard tests since pbcopy/pbpaste are not open source
|
||||
substituteInPlace pandas/io/tests/test_clipboard.py \
|
||||
--replace pandas.util.clipboard no_such_module \
|
||||
--replace OSError ImportError
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
homepage = "http://pandas.pydata.org/";
|
||||
description = "Python Data Analysis Library";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ raskin fridh ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
|
||||
xlrd = buildPythonPackage rec {
|
||||
name = "xlrd-${version}";
|
||||
|
||||
@ -19348,6 +19401,8 @@ in {
|
||||
|
||||
scipy = callPackage ../development/python-modules/scipy { };
|
||||
|
||||
scipy_0_17 = callPackage ../development/python-modules/scipy/0.17.1.nix { };
|
||||
|
||||
scikitimage = buildPythonPackage rec {
|
||||
name = "scikit-image-${version}";
|
||||
version = "0.12.3";
|
||||
|
Loading…
Reference in New Issue
Block a user