diff options
author | Justin Lecher <jlec@gentoo.org> | 2015-05-13 12:50:55 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2015-05-13 12:50:55 +0000 |
commit | f03efd5402a93f13164cc9e1c543e0370d6cf5ea (patch) | |
tree | 72de769e1ce163202f6082ca5b7cfb1a727f485b /dev-python/pandas | |
parent | Version Bump; drop old (diff) | |
download | gentoo-2-f03efd5402a93f13164cc9e1c543e0370d6cf5ea.tar.gz gentoo-2-f03efd5402a93f13164cc9e1c543e0370d6cf5ea.tar.bz2 gentoo-2-f03efd5402a93f13164cc9e1c543e0370d6cf5ea.zip |
Version Bump
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key E9402A79B03529A2!)
Diffstat (limited to 'dev-python/pandas')
-rw-r--r-- | dev-python/pandas/ChangeLog | 9 | ||||
-rw-r--r-- | dev-python/pandas/files/pandas-0.16.1-zoneinfo.patch | 130 | ||||
-rw-r--r-- | dev-python/pandas/pandas-0.16.1.ebuild | 131 | ||||
-rw-r--r-- | dev-python/pandas/pandas-9999.ebuild | 4 |
4 files changed, 271 insertions, 3 deletions
diff --git a/dev-python/pandas/ChangeLog b/dev-python/pandas/ChangeLog index 29a105d09056..40a6ddd1402b 100644 --- a/dev-python/pandas/ChangeLog +++ b/dev-python/pandas/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-python/pandas # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pandas/ChangeLog,v 1.46 2015/05/13 08:13:05 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/pandas/ChangeLog,v 1.47 2015/05/13 12:50:55 jlec Exp $ + +*pandas-0.16.1 (13 May 2015) + + 13 May 2015; Justin Lecher <jlec@gentoo.org> + +files/pandas-0.16.1-zoneinfo.patch, +pandas-0.16.1.ebuild, + pandas-9999.ebuild: + Version Bump 13 May 2015; Justin Lecher <jlec@gentoo.org> +files/pandas-9999-zoneinfo.patch, pandas-9999.ebuild: diff --git a/dev-python/pandas/files/pandas-0.16.1-zoneinfo.patch b/dev-python/pandas/files/pandas-0.16.1-zoneinfo.patch new file mode 100644 index 000000000000..be02595e9da4 --- /dev/null +++ b/dev-python/pandas/files/pandas-0.16.1-zoneinfo.patch @@ -0,0 +1,130 @@ + pandas/compat/__init__.py | 14 ++++++++++++++ + pandas/tests/test_series.py | 3 ++- + pandas/tseries/tests/test_daterange.py | 2 +- + pandas/tseries/tests/test_period.py | 8 ++++---- + pandas/tseries/tests/test_timeseries.py | 6 +++--- + pandas/tslib.pyx | 6 +++++- + 6 files changed, 29 insertions(+), 10 deletions(-) + +diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py +index 6be0fac..2a27362 100644 +--- a/pandas/compat/__init__.py ++++ b/pandas/compat/__init__.py +@@ -26,6 +26,7 @@ Python 2.6 compatibility: + + Other items: + * OrderedDefaultDict ++* platform checker + """ + # pylint disable=W0611 + import functools +@@ -754,3 +755,16 @@ class OrderedDefaultdict(OrderedDict): + def __reduce__(self): # optional, for pickle support + args = self.default_factory if self.default_factory else tuple() + return type(self), args, None, None, list(self.items()) ++ ++ ++# https://github.com/pydata/pandas/pull/9123 ++def is_platform_windows(): ++ return sys.platform == 'win32' or sys.platform == 'cygwin' ++ ++ ++def is_platform_linux(): ++ return sys.platform == 'linux2' ++ ++ ++def is_platform_mac(): ++ return sys.platform == 'darwin' +diff --git a/pandas/tests/test_series.py b/pandas/tests/test_series.py +index 22f8aee..925cfa8 100644 +--- a/pandas/tests/test_series.py ++++ b/pandas/tests/test_series.py +@@ -5398,7 +5398,8 @@ class TestSeries(tm.TestCase, CheckNameIntegration): + def test_getitem_setitem_datetime_tz_dateutil(self): + tm._skip_if_no_dateutil(); + from dateutil.tz import tzutc +- from dateutil.zoneinfo import gettz ++ from pandas.tslib import _dateutil_gettz as gettz ++ + tz = lambda x: tzutc() if x == 'UTC' else gettz(x) # handle special case for utc in dateutil + + from pandas import date_range +diff --git a/pandas/tseries/tests/test_daterange.py b/pandas/tseries/tests/test_daterange.py +index 841d81c..69b1d84 100644 +--- a/pandas/tseries/tests/test_daterange.py ++++ b/pandas/tseries/tests/test_daterange.py +@@ -441,7 +441,7 @@ class TestDateRange(tm.TestCase): + def test_month_range_union_tz_dateutil(self): + _skip_if_windows_python_3() + tm._skip_if_no_dateutil() +- from dateutil.zoneinfo import gettz as timezone ++ from pandas.tslib import _dateutil_gettz as timezone + tz = timezone('US/Eastern') + + early_start = datetime(2011, 1, 1) +diff --git a/pandas/tseries/tests/test_period.py b/pandas/tseries/tests/test_period.py +index 70c706f..0218af6 100644 +--- a/pandas/tseries/tests/test_period.py ++++ b/pandas/tseries/tests/test_period.py +@@ -101,15 +101,15 @@ class TestPeriodProperties(tm.TestCase): + pytz.timezone('Europe/Brussels').normalize(p).tzinfo) + + def test_timestamp_tz_arg_dateutil(self): +- import dateutil ++ from pandas.tslib import _dateutil_gettz as gettz + from pandas.tslib import maybe_get_tz + p = Period('1/1/2005', freq='M').to_timestamp(tz=maybe_get_tz('dateutil/Europe/Brussels')) +- self.assertEqual(p.tz, dateutil.zoneinfo.gettz('Europe/Brussels')) ++ self.assertEqual(p.tz, gettz('Europe/Brussels')) + + def test_timestamp_tz_arg_dateutil_from_string(self): +- import dateutil ++ from pandas.tslib import _dateutil_gettz as gettz + p = Period('1/1/2005', freq='M').to_timestamp(tz='dateutil/Europe/Brussels') +- self.assertEqual(p.tz, dateutil.zoneinfo.gettz('Europe/Brussels')) ++ self.assertEqual(p.tz, gettz('Europe/Brussels')) + + def test_timestamp_nat_tz(self): + t = Period('NaT', freq='M').to_timestamp() +diff --git a/pandas/tseries/tests/test_timeseries.py b/pandas/tseries/tests/test_timeseries.py +index 0c4961d..6c20b02 100644 +--- a/pandas/tseries/tests/test_timeseries.py ++++ b/pandas/tseries/tests/test_timeseries.py +@@ -417,9 +417,9 @@ class TestTimeSeries(tm.TestCase): + def test_timestamp_to_datetime_explicit_dateutil(self): + _skip_if_windows_python_3() + tm._skip_if_no_dateutil() +- import dateutil ++ from pandas.tslib import _dateutil_gettz as gettz + rng = date_range('20090415', '20090519', +- tz=dateutil.zoneinfo.gettz('US/Eastern')) ++ tz=gettz('US/Eastern')) + + stamp = rng[0] + dtval = stamp.to_pydatetime() +@@ -1807,7 +1807,7 @@ class TestTimeSeries(tm.TestCase): + def test_append_concat_tz_dateutil(self): + # GH 2938 + tm._skip_if_no_dateutil() +- from dateutil.zoneinfo import gettz as timezone ++ from pandas.tslib import _dateutil_gettz as timezone + + rng = date_range('5/8/2012 1:45', periods=10, freq='5T', + tz='dateutil/US/Eastern') +diff --git a/pandas/tslib.pyx b/pandas/tslib.pyx +index 40dbbd7..4feeaec 100644 +--- a/pandas/tslib.pyx ++++ b/pandas/tslib.pyx +@@ -41,7 +41,11 @@ from datetime import time as datetime_time + # dateutil compat + from dateutil.tz import (tzoffset, tzlocal as _dateutil_tzlocal, tzfile as _dateutil_tzfile, + tzutc as _dateutil_tzutc) +-from dateutil.zoneinfo import gettz as _dateutil_gettz ++from pandas.compat import is_platform_windows ++if is_platform_windows(): ++ from dateutil.tz import gettz as _dateutil_gettz ++else: ++ from dateutil.zoneinfo import gettz as _dateutil_gettz + + from pytz.tzinfo import BaseTzInfo as _pytz_BaseTzInfo + from pandas.compat import parse_date, string_types, PY3, iteritems diff --git a/dev-python/pandas/pandas-0.16.1.ebuild b/dev-python/pandas/pandas-0.16.1.ebuild new file mode 100644 index 000000000000..ad1059ec7d2f --- /dev/null +++ b/dev-python/pandas/pandas-0.16.1.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pandas/pandas-0.16.1.ebuild,v 1.1 2015/05/13 12:50:55 jlec Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{3,4} ) +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 eutils flag-o-matic virtualx + +DESCRIPTION="Powerful data structures for data analysis and statistics" +HOMEPAGE="http://pandas.pydata.org/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc excel html test R" + +EXTRA_DEPEND=" + >=dev-python/google-api-python-client-1.2.0[$(python_gen_usedep python2_7 pypy)] + dev-python/openpyxl[${PYTHON_USEDEP}] + dev-python/pymysql[${PYTHON_USEDEP}] + dev-python/python-gflags[$(python_gen_usedep python2_7 pypy)] + dev-python/psycopg:2[${PYTHON_USEDEP}] + dev-python/statsmodels[${PYTHON_USEDEP}] + dev-python/sqlalchemy[${PYTHON_USEDEP}] + dev-python/xlsxwriter[${PYTHON_USEDEP}] + " +CDEPEND=" + >dev-python/numpy-1.7[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-2.0[${PYTHON_USEDEP}] + !~dev-python/openpyxl-1.9.0[${PYTHON_USEDEP}]" +DEPEND="${CDEPEND} + >=dev-python/cython-0.19.1[${PYTHON_USEDEP}] + doc? ( + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/ipython[${PYTHON_USEDEP}] + dev-python/html5lib[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] + dev-python/openpyxl[${PYTHON_USEDEP}] + >=dev-python/pytables-3.0.0[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/rpy[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + >=dev-python/sphinx-1.2.1[${PYTHON_USEDEP}] + dev-python/xlrd[$(python_gen_usedep 'python2_7')] + dev-python/xlwt[$(python_gen_usedep 'python2_7')] + x11-misc/xclip + ) + test? ( + ${EXTRA_DEPEND} + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + x11-misc/xclip + x11-misc/xsel + )" +# dev-python/statsmodels invokes a circular dep +# hence rm from doc? ( ), again +RDEPEND="${CDEPEND} + >=dev-python/numexpr-2.1[${PYTHON_USEDEP}] + dev-python/bottleneck[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + dev-python/pytables[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + excel? ( + >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] + dev-python/xlrd[$(python_gen_usedep 'python2_7')] + dev-python/xlwt[$(python_gen_usedep 'python2_7')] + ) + html? ( + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + || ( + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/html5lib[${PYTHON_USEDEP}] ) + ) + R? ( dev-python/rpy[${PYTHON_USEDEP}] )" + +PATCHES=( + "${FILESDIR}"/${P}-zoneinfo.patch +) + +python_prepare_all() { + # Prevent un-needed download during build + sed -e "/^ 'sphinx.ext.intersphinx',/d" -i doc/source/conf.py || die + + distutils-r1_python_prepare_all +} + +python_compile_all() { + # To build docs the need be located in $BUILD_DIR, + # else PYTHONPATH points to unusable modules. + if use doc; then + cd "${BUILD_DIR}"/lib || die + cp -ar "${S}"/doc . && cd doc || die + LANG=C PYTHONPATH=. "${EPYTHON}" make.py html || die + fi +} + +python_test() { + local test_pandas='not network and not disabled' + [[ -n "${FAST_PANDAS}" ]] && test_pandas+=' and not slow' + pushd "${BUILD_DIR}"/lib > /dev/null + VIRTUALX_COMMAND="nosetests" + PYTHONPATH=. MPLCONFIGDIR=. HOME=. \ + virtualmake --verbosity=3 -A "${test_pandas}" pandas + popd > /dev/null +} + +python_install_all() { + if use doc; then + dodoc -r "${BUILD_DIR}"/lib/doc/build/html + einfo "An initial build of docs is absent of references to statsmodels" + einfo "due to circular dependency. To have them included, emerge" + einfo "statsmodels next and re-emerge pandas with USE doc" + fi + + distutils-r1_python_install_all +} + +pkg_postinst() { + local x + elog "Please install" + for x in ${EXTRA_DEPEND}; do + optfeature "additional functionality" "${x%%[*}" + done +} diff --git a/dev-python/pandas/pandas-9999.ebuild b/dev-python/pandas/pandas-9999.ebuild index ac56635a0f63..5b9534625281 100644 --- a/dev-python/pandas/pandas-9999.ebuild +++ b/dev-python/pandas/pandas-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pandas/pandas-9999.ebuild,v 1.11 2015/05/13 08:13:05 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/pandas/pandas-9999.ebuild,v 1.12 2015/05/13 12:50:55 jlec Exp $ EAPI=5 @@ -79,7 +79,7 @@ RDEPEND="${CDEPEND} ) R? ( dev-python/rpy[${PYTHON_USEDEP}] )" -PATCHES=( +_PATCHES=( "${FILESDIR}"/${P}-zoneinfo.patch ) |