git.iko.soy/typeable/nixpkgs
on master help sign in
Resurrect pandas 0.17.1
commit96874c6e719dbe8c53cc1dea832f7e1866297a24 authorShea Levy <shea@shealevy.com> dateFri 6 Oct 2017, 13:55 (9 years ago) parent75bd873
2 files changed+111
pkgs/development/python-modules/scipy/0.17.1.nix+56 pkgs/top-level/python-packages.nix+55
pkgs/development/python-modules/scipy/0.17.1.nixnew file+56
@@ -0,0 +1,56 @@
1+{lib, fetchurl, python, buildPythonPackage, isPyPy, gfortran, nose, numpy}:
2+
3+buildPythonPackage rec {
4+ pname = "scipy";
5+ version = "0.17.1";
6+ name = "${pname}-${version}";
7+
8+ src = fetchurl {
9+ url = "mirror://pypi/s/scipy/scipy-${version}.tar.gz";
10+ sha256 = "1b1qpfz2j2rvmlplsjbnznnxnqr9ckbmis506110ii1w07wd4k4w";
11+ };
12+
13+ buildInputs = [ gfortran nose numpy.blas ];
14+ propagatedBuildInputs = [ numpy ];
15+
16+ # Remove tests because of broken wrapper
17+ prePatch = ''
18+ rm scipy/linalg/tests/test_lapack.py
19+ '';
20+
21+ preConfigure = ''
22+ sed -i '0,/from numpy.distutils.core/s//import setuptools;from numpy.distutils.core/' setup.py
23+ export NPY_NUM_BUILD_JOBS=$NIX_BUILD_CORES
24+ '';
25+
26+ preBuild = ''
27+ echo "Creating site.cfg file..."
28+ cat << EOF > site.cfg
29+ [openblas]
30+ include_dirs = ${numpy.blas}/include
31+ library_dirs = ${numpy.blas}/lib
32+ EOF
33+ '';
34+
35+ enableParallelBuilding = true;
36+
37+ checkPhase = ''
38+ runHook preCheck
39+ pushd dist
40+ ${python.interpreter} -c 'import scipy; scipy.test("fast", verbose=10)'
41+ popd
42+ runHook postCheck
43+ '';
44+
45+ passthru = {
46+ blas = numpy.blas;
47+ };
48+
49+ setupPyBuildFlags = [ "--fcompiler='gnu95'" ];
50+
51+ meta = {
52+ description = "SciPy (pronounced 'Sigh Pie') is open-source software for mathematics, science, and engineering. ";
53+ homepage = http://www.scipy.org/;
54+ maintainers = with lib.maintainers; [ fridh ];
55+ };
56+}
pkgs/top-level/python-packages.nix+55
@@ -14990,6 +14990,59 @@ in {
1499014990
1499114991 pandas = callPackage ../development/python-modules/pandas { };
1499214992
14993+ pandas_17 = let
14994+ inherit (pkgs.stdenv.lib) optional optionalString;
14995+ inherit (pkgs.stdenv) isDarwin;
14996+ in buildPythonPackage rec {
14997+ name = "pandas-${version}";
14998+ version = "0.17.1";
14999+
15000+ src = pkgs.fetchurl {
15001+ url = "https://pypi.python.org/packages/source/p/pandas/${name}.tar.gz";
15002+ sha256 = "cfd7214a7223703fe6999fbe34837749540efee1c985e6aee9933f30e3f72837";
15003+ };
15004+
15005+ buildInputs = with self; [ nose ] ++ optional isDarwin pkgs.libcxx;
15006+ propagatedBuildInputs = with self; [
15007+ dateutil
15008+ scipy_0_17
15009+ numexpr
15010+ pytz
15011+ xlrd
15012+ bottleneck
15013+ sqlalchemy
15014+ lxml
15015+ html5lib
15016+# modules.sqlite3
15017+ beautifulsoup4
15018+ ] ++ optional isDarwin pkgs.darwin.locale; # provides the locale command
15019+
15020+ # For OSX, we need to add a dependency on libcxx, which provides
15021+ # `complex.h` and other libraries that pandas depends on to build.
15022+ patchPhase = optionalString isDarwin ''
15023+ cpp_sdk="${pkgs.libcxx}/include/c++/v1";
15024+ echo "Adding $cpp_sdk to the setup.py common_include variable"
15025+ substituteInPlace setup.py \
15026+ --replace "['pandas/src/klib', 'pandas/src']" \
15027+ "['pandas/src/klib', 'pandas/src', '$cpp_sdk']"
15028+
15029+ # disable clipboard tests since pbcopy/pbpaste are not open source
15030+ substituteInPlace pandas/io/tests/test_clipboard.py \
15031+ --replace pandas.util.clipboard no_such_module \
15032+ --replace OSError ImportError
15033+ '';
15034+
15035+ doCheck = false;
15036+
15037+ meta = {
15038+ homepage = "http://pandas.pydata.org/";
15039+ description = "Python Data Analysis Library";
15040+ license = licenses.bsd3;
15041+ maintainers = with maintainers; [ raskin fridh ];
15042+ platforms = platforms.unix;
15043+ };
15044+ };
15045+
1499315046 xlrd = buildPythonPackage rec {
1499415047 name = "xlrd-${version}";
1499515048
@@ -19348,6 +19401,8 @@ in {
1934819401
1934919402 scipy = callPackage ../development/python-modules/scipy { };
1935019403
19404+ scipy_0_17 = callPackage ../development/python-modules/scipy/0.17.1.nix { };
19405+
1935119406 scikitimage = buildPythonPackage rec {
1935219407 name = "scikit-image-${version}";
1935319408 version = "0.12.3";