summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-10-20 15:51:49 +0200
committerJustin Lecher <jlec@gentoo.org>2015-10-21 15:40:24 +0200
commita6a6d81a751af91466af39a260459c8ce74b3702 (patch)
treec0153585f1f752a3ba869418caf35018794bca06 /dev-python/statsmodels
parentdev-python/pycurl: Backport fix for py3.5 (diff)
downloadgentoo-a6a6d81a751af91466af39a260459c8ce74b3702.tar.gz
gentoo-a6a6d81a751af91466af39a260459c8ce74b3702.tar.bz2
gentoo-a6a6d81a751af91466af39a260459c8ce74b3702.zip
dev-python/statsmodels: Add python3.5 support
Fix test for latest versions of pandas and numpy Package-Manager: portage-2.2.23 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'dev-python/statsmodels')
-rw-r--r--dev-python/statsmodels/files/statsmodels-0.6.1-numpy-1.10.patch20
-rw-r--r--dev-python/statsmodels/files/statsmodels-0.6.1-pandas-0.17.0.patch30
-rw-r--r--dev-python/statsmodels/metadata.xml2
-rw-r--r--dev-python/statsmodels/statsmodels-0.6.1.ebuild7
4 files changed, 57 insertions, 2 deletions
diff --git a/dev-python/statsmodels/files/statsmodels-0.6.1-numpy-1.10.patch b/dev-python/statsmodels/files/statsmodels-0.6.1-numpy-1.10.patch
new file mode 100644
index 000000000000..2d9720c5fec6
--- /dev/null
+++ b/dev-python/statsmodels/files/statsmodels-0.6.1-numpy-1.10.patch
@@ -0,0 +1,20 @@
+ statsmodels/tsa/ar_model.py | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/statsmodels/tsa/ar_model.py b/statsmodels/tsa/ar_model.py
+index f0af7ee..fe05634 100644
+--- a/statsmodels/tsa/ar_model.py
++++ b/statsmodels/tsa/ar_model.py
+@@ -256,10 +256,8 @@ class AR(tsbase.TimeSeriesModel):
+
+ Vpinv = np.zeros((p, p), dtype=params.dtype)
+ for i in range(1, p1):
+- Vpinv[i-1, i-1:] = np.correlate(params0, params0[:i],
+- old_behavior=False)[:-1]
+- Vpinv[i-1, i-1:] -= np.correlate(params0[-i:], params0,
+- old_behavior=False)[:-1]
++ Vpinv[i-1, i-1:] = np.correlate(params0, params0[:i])[:-1]
++ Vpinv[i-1, i-1:] -= np.correlate(params0[-i:], params0)[:-1]
+
+ Vpinv = Vpinv + Vpinv.T - np.diag(Vpinv.diagonal())
+ return Vpinv
diff --git a/dev-python/statsmodels/files/statsmodels-0.6.1-pandas-0.17.0.patch b/dev-python/statsmodels/files/statsmodels-0.6.1-pandas-0.17.0.patch
new file mode 100644
index 000000000000..540135c9e125
--- /dev/null
+++ b/dev-python/statsmodels/files/statsmodels-0.6.1-pandas-0.17.0.patch
@@ -0,0 +1,30 @@
+ setup.py | 2 +-
+ statsmodels/tools/testing.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 1a7da9a..a6d1b33 100644
+--- a/setup.py
++++ b/setup.py
+@@ -134,7 +134,7 @@ def check_dependency_versions(min_versions):
+ (spversion, min_versions['scipy']))
+
+ try:
+- from pandas.version import short_version as pversion
++ from pandas import __version__ as pversion
+ except ImportError:
+ install_requires.append('pandas')
+ else:
+diff --git a/statsmodels/tools/testing.py b/statsmodels/tools/testing.py
+index 1fde1de..92e77fc 100644
+--- a/statsmodels/tools/testing.py
++++ b/statsmodels/tools/testing.py
+@@ -17,7 +17,7 @@ def strip_rc(version):
+ def is_pandas_min_version(min_version):
+ '''check whether pandas is at least min_version
+ '''
+- from pandas.version import short_version as pversion
++ from pandas import __version__ as pversion
+ return StrictVersion(strip_rc(pversion)) >= min_version
+
+
diff --git a/dev-python/statsmodels/metadata.xml b/dev-python/statsmodels/metadata.xml
index 0bb27ed6f2b4..c371fe81e6ea 100644
--- a/dev-python/statsmodels/metadata.xml
+++ b/dev-python/statsmodels/metadata.xml
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>python</herd>
diff --git a/dev-python/statsmodels/statsmodels-0.6.1.ebuild b/dev-python/statsmodels/statsmodels-0.6.1.ebuild
index 5224bb0efcc1..a8083e3ad687 100644
--- a/dev-python/statsmodels/statsmodels-0.6.1.ebuild
+++ b/dev-python/statsmodels/statsmodels-0.6.1.ebuild
@@ -4,7 +4,7 @@
EAPI=5
-PYTHON_COMPAT=( python2_7 python3_{3,4} )
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
inherit distutils-r1 virtualx
@@ -35,6 +35,11 @@ DEPEND="${CDEPEND}
)
test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+PATCHES=(
+ "${FILESDIR}"/${P}-pandas-0.17.0.patch
+ "${FILESDIR}"/${P}-numpy-1.10.patch
+)
+
pkg_setup() {
export MPLCONFIGDIR="${T}" HOME="${T}"
}