mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-22 05:19:00 +02:00
Merge pull request #8079 from adnelson/pandas_osx
supporting pandas on osx, added test suite
This commit is contained in:
commit
eb9874389b
|
@ -8116,21 +8116,79 @@ let
|
||||||
sha256 = "1w3wjnn3v37hf3hrd24lfgk6vpykarv9mihhpcfq6y7rg586bgjk";
|
sha256 = "1w3wjnn3v37hf3hrd24lfgk6vpykarv9mihhpcfq6y7rg586bgjk";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = with self; [ nose ];
|
buildInputs = [ self.nose ];
|
||||||
propagatedBuildInputs = with self; [ dateutil numpy pytz modules.sqlite3 ];
|
propagatedBuildInputs = with self; [
|
||||||
|
dateutil
|
||||||
|
numpy
|
||||||
|
scipy
|
||||||
|
numexpr
|
||||||
|
pytz
|
||||||
|
xlrd
|
||||||
|
bottleneck
|
||||||
|
sqlalchemy9
|
||||||
|
lxml
|
||||||
|
modules.sqlite3
|
||||||
|
];
|
||||||
|
|
||||||
# Tests require networking to pass
|
preCheck = ''
|
||||||
doCheck = false;
|
# Need to do this patch or tests will fail (swaps 1st and 2nd lines).
|
||||||
|
# See: https://github.com/pydata/pandas/commit/c4bcc2054bfd2f89b640bea0c9a109b0184d6710
|
||||||
|
first=$(sed -n '1p' < pandas/tests/test_format.py)
|
||||||
|
second=$(sed -n '2p' < pandas/tests/test_format.py)
|
||||||
|
rest=$(tail -n +3 pandas/tests/test_format.py)
|
||||||
|
echo $second > pandas/tests/test_format.py
|
||||||
|
echo $first >> pandas/tests/test_format.py
|
||||||
|
echo "$rest" >> pandas/tests/test_format.py
|
||||||
|
|
||||||
|
# Need to skip this test; insert a line here... hacky but oh well.
|
||||||
|
badtest=pandas/tseries/tests/test_timezones.py
|
||||||
|
fixed=$TMPDIR/fixed_test_timezones.py
|
||||||
|
touch $fixed
|
||||||
|
head -n 602 $badtest > $fixed
|
||||||
|
echo ' raise nose.SkipTest("Not working")' >> $fixed
|
||||||
|
tail -n +603 $badtest >> $fixed
|
||||||
|
mv $fixed $badtest
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
|
||||||
|
# The flag `-A 'not network'` will disable tests that use internet.
|
||||||
|
# The `-e` flag disables a few problematic tests.
|
||||||
|
${python.executable} setup.py nosetests -A 'not network' --stop \
|
||||||
|
-e 'test_clipboard|test_series' --verbosity=3
|
||||||
|
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://pandas.pydata.org/";
|
homepage = "http://pandas.pydata.org/";
|
||||||
description = "Python Data Analysis Library";
|
description = "Python Data Analysis Library";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = with maintainers; [ raskin ];
|
maintainers = with maintainers; [ raskin ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xlrd = buildPythonPackage rec {
|
||||||
|
name = "xlrd-${version}";
|
||||||
|
version = "0.9.3";
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://pypi.python.org/packages/source/x/xlrd/xlrd-${version}.tar.gz";
|
||||||
|
sha256 = "174ks80h0g9p67ahnakf0y7di3gvbhxvb1jlk097gvd7gpi3aflk";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
bottleneck = buildPythonPackage rec {
|
||||||
|
name = "Bottleneck-${version}";
|
||||||
|
version = "1.0.0";
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://pypi.python.org/packages/source/B/Bottleneck/Bottleneck-${version}.tar.gz";
|
||||||
|
sha256 = "15dl0ll5xmfzj2fsvajzwxsb9dbw5i9fx9i4r6n4i5nzzba7m6wd";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = [self.numpy];
|
||||||
|
};
|
||||||
|
|
||||||
parsedatetime = buildPythonPackage rec {
|
parsedatetime = buildPythonPackage rec {
|
||||||
name = "parsedatetime-${version}";
|
name = "parsedatetime-${version}";
|
||||||
version = "1.4";
|
version = "1.4";
|
||||||
|
|
Loading…
Reference in a new issue