diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/pandas |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/pandas')
-rw-r--r-- | dev-python/pandas/Manifest | 19 | ||||
-rw-r--r-- | dev-python/pandas/files/pandas-0.17.0-testfix-backport.patch | 28 | ||||
-rw-r--r-- | dev-python/pandas/files/pandas-0.19.1-gapi.patch | 27 | ||||
-rw-r--r-- | dev-python/pandas/files/pandas-0.19.1-seqf.patch | 357 | ||||
-rw-r--r-- | dev-python/pandas/metadata.xml | 25 | ||||
-rw-r--r-- | dev-python/pandas/pandas-0.16.2.ebuild | 128 | ||||
-rw-r--r-- | dev-python/pandas/pandas-0.17.0.ebuild | 137 | ||||
-rw-r--r-- | dev-python/pandas/pandas-0.17.1.ebuild | 166 | ||||
-rw-r--r-- | dev-python/pandas/pandas-0.19.1.ebuild | 165 | ||||
-rw-r--r-- | dev-python/pandas/pandas-0.20.1.ebuild | 162 | ||||
-rw-r--r-- | dev-python/pandas/pandas-0.20.3.ebuild | 157 | ||||
-rw-r--r-- | dev-python/pandas/pandas-9999.ebuild | 163 |
12 files changed, 1534 insertions, 0 deletions
diff --git a/dev-python/pandas/Manifest b/dev-python/pandas/Manifest new file mode 100644 index 000000000000..40077037a5d4 --- /dev/null +++ b/dev-python/pandas/Manifest @@ -0,0 +1,19 @@ +AUX pandas-0.17.0-testfix-backport.patch 1175 SHA256 15be2b513d47cc9b6190a028018e4e6ca7402b8dfdbbbd9623f722b978bfeb9a SHA512 1b59919c6a3e3d835af3f1fac2350db596fa420a02f405a4b0de4a751c2a762606557306e4b42cf696730a0c104ef10544a4d0f82a64a6839b38ba14245f30ef WHIRLPOOL 1c7c36c230357828cc2cc6319308ea04bdfc651d5f8fb85c9c386be4c08b70b126d0a7122d801410e3b7e12ed3344bda31217163fd4aee2133ccdd6fb1224d02 +AUX pandas-0.19.1-gapi.patch 799 SHA256 6f5a49af6561f87c1dab007d8b9c3ae55cff297ac4f9641b195b3f957c6b682c SHA512 b1a4e7c5f480efadfaf70caaa3293cb3f16ebf36c4705597a22ecc06de7e5b2379ddb4061279d669d2c66d3ef149a74f300ec1127bd441ad1b9288cb9233c781 WHIRLPOOL d0c5c0e7b545c3ba0c9725a1a9ace994013ffc0e2bf3f86e9b0dd178a900c5a5fa789c6c2668a2be58ce06d91feeac5625bcee50a2a2f74a25fa1f7794d1e44a +AUX pandas-0.19.1-seqf.patch 14381 SHA256 d8ff9c6bc98029f9f1d112551f5e5794bc7344aef3651c1d4da5f7b5c7729a38 SHA512 b5675c89e087d47b94cfb036047b396d5a94b74bc03e95c92d5152bfc5598feddba88a781b6a11e533c46ba638aa50f0814d383c20d95f4e091deaee480b6d3e WHIRLPOOL 281f3bb00e3d1351b450b42d0c7eba01ff2c53d8f4a2b8b4f7b17ba0f257c771e5e45dfa5d6fe46180ed3e8030e12126729bf8c7c1543445d10715cf1fa34295 +DIST pandas-0.16.2.tar.gz 4931751 SHA256 e01853dfe111f3aea005315573400b7216ddbabbf1f28d482a71217d67ae4f81 SHA512 44874e12a42a01dd7ed88f3f97e954732a534a5e2dc4815ef6203bdb2d88850a607e6631a35ae8fc79f4621a5dfaa34f39bb1c9a0ecfb17da1cf0c10f35ff27b WHIRLPOOL 6f2874ac07b49f4b2aaefdb87375b7c5adb31e3ff60c6b808f3e3467ad82999dd894de884ebbfd64fc7235e875d17ce871b516c96ff71a17310b708597168702 +DIST pandas-0.17.0.tar.gz 6508621 SHA256 320d4fdf734b82adebc8fde9d8ca4b05fe155a72b6f7aa95d76242da8748d6a4 SHA512 bae6964e263c7ff6cac722cdfe23081f23c357d9bc39a670b5627bef4630c236a58aa8c0393eae921721bf7049c8e5266b4dea71dd957da5d89dafc14a04797b WHIRLPOOL d654eb2f9ffbfedbde60e4a6e6ce6f54650a8a68b4d20035744aa55111525d6bba4dae2ccbfce65acf71bb200e2e6029c7f6c9bcc9d0c582d808444738baedb1 +DIST pandas-0.17.1.tar.gz 6674479 SHA256 cfd7214a7223703fe6999fbe34837749540efee1c985e6aee9933f30e3f72837 SHA512 9d9f9064585b1f3551625e0c8f4eedaaa1253790c2a5cb28e58e70eb805cc18f9770d793aa748cbd76798488ff60efdd01eb4b21daf5ad8f1dc4d9c050487234 WHIRLPOOL 5238575bd64b8d38db4f9a0ea987a7f78ffd1821e5a22bad65c84c407feca3af6f3b536a0a2f337291aa04e94c86fdb40382dad4ce50f8a33a5e26d655c628c2 +DIST pandas-0.19.1.tar.gz 8360233 SHA256 2509feaeda72fce03675e2eccd2284bb1cadb6a0737008a5e741fe2431d47421 SHA512 6451990a7fae8c6db8ab0b014a13b4f1828754d3998f13c17b111f891fb9fd23f8e09b907623096dfa55668c42298eee1373210a9fddb95f56dd7d552b964e6f WHIRLPOOL 700c0d819ab62134baf56430b7fa8840636ea377d00397341d33ec5f13474d9eeefea245aede80a80f7c16348ef811788947e5fe0020c9770005c74dd1288ef3 +DIST pandas-0.20.1.tar.gz 10307434 SHA256 42707365577ef69f7c9c168ddcf045df2957595a9ee71bc13c7997eecb96b190 SHA512 d477a815914c825efd6430f7eb19f3f9115c1c4ab03000ca6d4f64023f7b5f53eff512792fea2d8b33c7febb3667fc3a3de55f11eeb453f285cae40e6b473707 WHIRLPOOL fca35c7178441e3cfe990740aecba923d8b3d56d70fa7b0285b09305a0d2f7a6ad01bb906d6d92748a038a3841cda783f01f75f93b67f15c53c9854a43819841 +DIST pandas-0.20.3.tar.gz 10402185 SHA256 a777e07633d83d546c55706420179551c8e01075b53c497dcf8ae4036766bc66 SHA512 891c7e04d075f96fadf3775e903472e279eaeaa4509eb0da81a74261a3ed86ff309de0b5a2c100ee93dd968fed1df6d7e426ca78785b2b36785fe7679218fdc5 WHIRLPOOL 7a2a09e0a0d74cad4c8c89b63ecebad73e8defc99f17cbcd0ab56ca23cf9b1eb7c142b07d52ce9e53c7409ace0d4f71df9c855fef9817fa74f48b90bb51e6cf5 +EBUILD pandas-0.16.2.ebuild 3830 SHA256 adb7f62f0dee72f210d8cfd4db81f63b9bb637ec5e44e102c7dfddf5eec4c537 SHA512 b6e18279292c1772e5d9527e5f4baf520d07f30ee45e3604946cdc2b1731f881519815c229bdda41b2a02740c04f3d70fce6210bac094fb55c23fc5364970808 WHIRLPOOL e7d7002d9a4b2d7c6266bf2fce66206646e81b93079571df695e383eb9648959bec0fafe876db9e3cff171d1dbd1eb8cda5773b4cb32fef1649e9aa75d10ab6f +EBUILD pandas-0.17.0.ebuild 3983 SHA256 beaa01d095778ec8077b6808cc4bbeae94fb46d4fc15457d013d08d9572f2896 SHA512 6a70c8b7045218f70ade388bde921c0f48c70344623d3ccaa4c0c7dd0ed35198da14e5faa28d1b16ed3a3ff88e174e662c53c2bb5cd6186464e8b718c97d84c7 WHIRLPOOL f6c424e2630317aa93923cfa6608ca2a36b2351bc221188522f300a4ad0428728918bd036c75652cbc64362ec73160c9bff24614b546e9cb844ebe629be743c8 +EBUILD pandas-0.17.1.ebuild 5955 SHA256 0eb646b49a97be79d185e37e455f377ea5d91d6b48f06bfb76c904077a45b73f SHA512 7fd34871cdf5178536c45416c2fcb39d76e3fa3355cee9ce39e44a228da6cb929980e52727683ece946328d0acd7f8a9072f60e1d696d9f00fea7b07f187f941 WHIRLPOOL 56731bb06b8b717fcd1fc4edc1eff9278e90e4bc8247dc93bc749a66a11a4ee04f5e3e56c29a666e5ec27b5e0513bc6f45f4ce716db32e44cd74fddd091159a5 +EBUILD pandas-0.19.1.ebuild 5913 SHA256 64b156ca01585a8e069ec8941e541e0b035f7f03cb207a4f72591932e80c702b SHA512 6e88582440d02ad3adf338692082ff671c0c4f93f56adb029abfa5dea7210de30308371f990e4b2bbcdfbd510040e40c18a373123a862099d779993f81dda714 WHIRLPOOL e5696d87bc8de493d5e9e0e337e760bf8f06ac6115e18801aa549dbf2ad8e5a26987e27bb7f10166dd0c0e42d0b1a3437ce13ddfc1bb8eb145d11f44067d7af2 +EBUILD pandas-0.20.1.ebuild 5846 SHA256 91d2305d0e0b90a65f176516f1234e986170011051c4678d89ca342bc4da4d9b SHA512 9bb42445edb8f4dc62df830e30b8ea2e0856bf214f0621d7cbecebd2adc142bc2a4031e162e9ff93daf5f600d9e405386a32dca515fa6433f91e962c8ae00c37 WHIRLPOOL 864bd412aed25ece04bae43dd77bc729420725b4b26532dc726c09060d6ee8a755f4f6b19207aed5a51640cfbaa8bfa3ac562b55e3f43a68329a2dcd83286b0f +EBUILD pandas-0.20.3.ebuild 5759 SHA256 e76501b5e8add675f43eacb4ef26148873b069cb561170dbcf936c05386a24ae SHA512 fe6f54a082a50d4ab3edb16c9b2f11cae1440027b06e35b539133b76584c9ae615fa9f72a70328df26de7012c67d250574e47ec0b443eb84e480792b6743846b WHIRLPOOL ca0ec9509718f44a013ac116880a8a0c30f8e96be7340b7e463fbb08406e296eca92b6f8c6cbb82aa8ba2fae179804524cb905b5540427eb7bb0d2c319f01e54 +EBUILD pandas-9999.ebuild 5830 SHA256 6efa18dc578cd73a3cba94fce93931d15f2fa1365d97ddb5e66477273bcf2894 SHA512 b3bacfba75d58b10f0e4861ed7df8127af02ad4b65c71af58a5b68f43df23b0cb9c0646a720edd9f1dbdcc1a7fc59bbfd7d086428cc8e4439b46de24acfc18d7 WHIRLPOOL 65ace82bc9b30006db27ba7a19e919291dad9056175fdbb22b8e9607b0fbe1284f7be30ae380bb8780f6c52a0b74afe4b502a3401034477cd5029ee0f3ede9f9 +MISC ChangeLog 4521 SHA256 c5050821f598293335c7600f041544d671b964bc4aaa192a04be72120c57aef1 SHA512 1545d2199a02c8e38a7946dbe14ad91f3d5223976465512b8a30fe5e888ad611b88fbcdfe5b79efad6c153f973512cb7dc8a716c64d83c813060174141e5c4bd WHIRLPOOL bed06c4bec34e08d98781062da2c55d4840073132c45e5b253413c9612cb763af609f95a34d64fc51a2779cc8bf08d6026c016052d87a7f7413faf4991a644b4 +MISC ChangeLog-2015 9042 SHA256 987166649cbcd0aade8afe74fd18ff40230753dde4655205ec8d878cd3fbf114 SHA512 223baba993032a339753768ec7538b244f1c6bc812f0fc18327bebbc5005c159ac2f98213669f5daae29eaaa18c2bc84306239bb6714643436b1f02e59def4c3 WHIRLPOOL 5b96a18d1d7349200e7665c3ea263b0d1d22224c66f930949a9196d7c2ff36fd3903a2302d93e58ed2504a37ec286091d4586cc1c2c27ccc6ef56ba53e4876bb +MISC metadata.xml 1077 SHA256 e4a2642d0377f1bb1abcc5f657d6c5aa608e08f652a84e1cfdeddea988f466eb SHA512 60b23a75873ded48dd01a36dae62f45f1cf5d044b88b125bda249fd6cf558ddef42d6677218053ed9d73de31da54f1f85bd1f64eab9b377f1a8b51fe1c510308 WHIRLPOOL af582dd02005329c1483d0c7e1b52856e98151c5d04d97480d1936ffe7ccdaaeb00cb679efd1aa8f092ab1ce5fcf807be9f5de00cc559f4bc1b8b2f02564836b diff --git a/dev-python/pandas/files/pandas-0.17.0-testfix-backport.patch b/dev-python/pandas/files/pandas-0.17.0-testfix-backport.patch new file mode 100644 index 000000000000..c83319256f22 --- /dev/null +++ b/dev-python/pandas/files/pandas-0.17.0-testfix-backport.patch @@ -0,0 +1,28 @@ + pandas/tests/test_categorical.py | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/pandas/tests/test_categorical.py b/pandas/tests/test_categorical.py +old mode 100755 +new mode 100644 +index e97010e..1d14323 +--- a/pandas/tests/test_categorical.py ++++ b/pandas/tests/test_categorical.py +@@ -86,12 +86,14 @@ class TestCategorical(tm.TestCase): + factor = Categorical.from_array(arr, ordered=False) + self.assertFalse(factor.ordered) + +- # this however will raise as cannot be sorted +- # but fixed in newer versions of numpy +- if LooseVersion(np.__version__) < "1.10": ++ if compat.PY3: + self.assertRaises(TypeError, lambda : Categorical.from_array(arr, ordered=True)) + else: +- Categorical.from_array(arr, ordered=True) ++ # this however will raise as cannot be sorted (on PY3 or older numpies) ++ if LooseVersion(np.__version__) < "1.10": ++ self.assertRaises(TypeError, lambda : Categorical.from_array(arr, ordered=True)) ++ else: ++ Categorical.from_array(arr, ordered=True) + + def test_is_equal_dtype(self): + diff --git a/dev-python/pandas/files/pandas-0.19.1-gapi.patch b/dev-python/pandas/files/pandas-0.19.1-gapi.patch new file mode 100644 index 000000000000..7a0456fdacfc --- /dev/null +++ b/dev-python/pandas/files/pandas-0.19.1-gapi.patch @@ -0,0 +1,27 @@ +From 1d6dbb41b26a39121ec8c4f19f5da78bb0ab4af7 Mon Sep 17 00:00:00 2001 +From: Jeff Reback <jeff@reback.net> +Date: Sat, 12 Nov 2016 12:44:06 -0500 +Subject: [PATCH] TST: skip test_gbq.test_upload_data_if_table_exists_replace + for now + +--- + pandas/io/tests/test_gbq.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/pandas/io/tests/test_gbq.py b/pandas/io/tests/test_gbq.py +index cca1580b8..f6ff35a6d 100644 +--- a/pandas/io/tests/test_gbq.py ++++ b/pandas/io/tests/test_gbq.py +@@ -824,6 +824,9 @@ class TestToGBQIntegration(tm.TestCase): + private_key=_get_private_key_path()) + + def test_upload_data_if_table_exists_replace(self): ++ ++ raise nose.SkipTest("buggy test") ++ + destination_table = DESTINATION_TABLE + "4" + + test_size = 10 +-- +2.11.0 + diff --git a/dev-python/pandas/files/pandas-0.19.1-seqf.patch b/dev-python/pandas/files/pandas-0.19.1-seqf.patch new file mode 100644 index 000000000000..c82c14ff8fdd --- /dev/null +++ b/dev-python/pandas/files/pandas-0.19.1-seqf.patch @@ -0,0 +1,357 @@ +From f8bd08e9c2fc6365980f41b846bbae4b40f08b83 Mon Sep 17 00:00:00 2001 +From: Jeff Reback <jeff@reback.net> +Date: Sat, 12 Nov 2016 10:58:54 -0500 +Subject: [PATCH] BUG: segfault manifesting with dateutil=2.6 w.r.t. replace + when timezones are present + +closes #14621 + +Author: Jeff Reback <jeff@reback.net> + +Closes #14631 from jreback/replace and squashes the following commits: + +3f95042 [Jeff Reback] BUG: segfault manifesting with dateutil=2.6 w.r.t. replace when timezones are present +--- + ci/requirements-3.5_OSX.pip | 2 +- + doc/source/whatsnew/v0.19.2.txt | 3 ++ + pandas/tseries/offsets.py | 1 + + pandas/tseries/tests/test_offsets.py | 20 ++++--- + pandas/tseries/tests/test_timezones.py | 89 +++++++++++++++++++++++++++++-- + pandas/tseries/tests/test_tslib.py | 5 +- + pandas/tslib.pyx | 95 ++++++++++++++++++++++++++++------ + 7 files changed, 188 insertions(+), 27 deletions(-) + +diff --git a/pandas/tseries/offsets.py b/pandas/tseries/offsets.py +index 051cc8aa4..2e3852a7e 100644 +--- a/pandas/tseries/offsets.py ++++ b/pandas/tseries/offsets.py +@@ -68,6 +68,7 @@ def apply_wraps(func): + other = other.tz_localize(None) + + result = func(self, other) ++ + if self._adjust_dst: + result = tslib._localize_pydatetime(result, tz) + +diff --git a/pandas/tseries/tests/test_offsets.py b/pandas/tseries/tests/test_offsets.py +index 1735ac4e2..768e9212e 100644 +--- a/pandas/tseries/tests/test_offsets.py ++++ b/pandas/tseries/tests/test_offsets.py +@@ -1,4 +1,5 @@ + import os ++from distutils.version import LooseVersion + from datetime import date, datetime, timedelta + from dateutil.relativedelta import relativedelta + from pandas.compat import range, iteritems +@@ -4851,6 +4852,7 @@ class TestDST(tm.TestCase): + + def _test_offset(self, offset_name, offset_n, tstart, expected_utc_offset): + offset = DateOffset(**{offset_name: offset_n}) ++ + t = tstart + offset + if expected_utc_offset is not None: + self.assertTrue(get_utc_offset_hours(t) == expected_utc_offset) +@@ -4890,17 +4892,23 @@ class TestDST(tm.TestCase): + return Timestamp(string + offset_string).tz_convert(tz) + + def test_fallback_plural(self): +- """test moving from daylight savings to standard time""" ++ # test moving from daylight savings to standard time ++ import dateutil + for tz, utc_offsets in self.timezone_utc_offsets.items(): + hrs_pre = utc_offsets['utc_offset_daylight'] + hrs_post = utc_offsets['utc_offset_standard'] +- self._test_all_offsets( +- n=3, tstart=self._make_timestamp(self.ts_pre_fallback, +- hrs_pre, tz), +- expected_utc_offset=hrs_post) ++ ++ if dateutil.__version__ != LooseVersion('2.6.0'): ++ # buggy ambiguous behavior in 2.6.0 ++ # GH 14621 ++ # https://github.com/dateutil/dateutil/issues/321 ++ self._test_all_offsets( ++ n=3, tstart=self._make_timestamp(self.ts_pre_fallback, ++ hrs_pre, tz), ++ expected_utc_offset=hrs_post) + + def test_springforward_plural(self): +- """test moving from standard to daylight savings""" ++ # test moving from standard to daylight savings + for tz, utc_offsets in self.timezone_utc_offsets.items(): + hrs_pre = utc_offsets['utc_offset_standard'] + hrs_post = utc_offsets['utc_offset_daylight'] +diff --git a/pandas/tseries/tests/test_timezones.py b/pandas/tseries/tests/test_timezones.py +index 00e8ee631..db8cda5c7 100644 +--- a/pandas/tseries/tests/test_timezones.py ++++ b/pandas/tseries/tests/test_timezones.py +@@ -4,7 +4,7 @@ import nose + + import numpy as np + import pytz +- ++from distutils.version import LooseVersion + from pandas.types.dtypes import DatetimeTZDtype + from pandas import (Index, Series, DataFrame, isnull, Timestamp) + +@@ -518,8 +518,12 @@ class TestTimeZoneSupportPytz(tm.TestCase): + + times = date_range("2013-10-26 23:00", "2013-10-27 01:00", freq="H", + tz=tz, ambiguous='infer') +- self.assertEqual(times[0], Timestamp('2013-10-26 23:00', tz=tz)) +- self.assertEqual(times[-1], Timestamp('2013-10-27 01:00', tz=tz)) ++ self.assertEqual(times[0], Timestamp('2013-10-26 23:00', tz=tz, ++ freq="H")) ++ if dateutil.__version__ != LooseVersion('2.6.0'): ++ # GH 14621 ++ self.assertEqual(times[-1], Timestamp('2013-10-27 01:00', tz=tz, ++ freq="H")) + + def test_ambiguous_nat(self): + tz = self.tz('US/Eastern') +@@ -1163,6 +1167,85 @@ class TestTimeZones(tm.TestCase): + def setUp(self): + tm._skip_if_no_pytz() + ++ def test_replace(self): ++ # GH 14621 ++ # GH 7825 ++ # replacing datetime components with and w/o presence of a timezone ++ dt = Timestamp('2016-01-01 09:00:00') ++ result = dt.replace(hour=0) ++ expected = Timestamp('2016-01-01 00:00:00') ++ self.assertEqual(result, expected) ++ ++ for tz in self.timezones: ++ dt = Timestamp('2016-01-01 09:00:00', tz=tz) ++ result = dt.replace(hour=0) ++ expected = Timestamp('2016-01-01 00:00:00', tz=tz) ++ self.assertEqual(result, expected) ++ ++ # we preserve nanoseconds ++ dt = Timestamp('2016-01-01 09:00:00.000000123', tz=tz) ++ result = dt.replace(hour=0) ++ expected = Timestamp('2016-01-01 00:00:00.000000123', tz=tz) ++ self.assertEqual(result, expected) ++ ++ # test all ++ dt = Timestamp('2016-01-01 09:00:00.000000123', tz=tz) ++ result = dt.replace(year=2015, month=2, day=2, hour=0, minute=5, ++ second=5, microsecond=5, nanosecond=5) ++ expected = Timestamp('2015-02-02 00:05:05.000005005', tz=tz) ++ self.assertEqual(result, expected) ++ ++ # error ++ def f(): ++ dt.replace(foo=5) ++ self.assertRaises(ValueError, f) ++ ++ def f(): ++ dt.replace(hour=0.1) ++ self.assertRaises(ValueError, f) ++ ++ # assert conversion to naive is the same as replacing tzinfo with None ++ dt = Timestamp('2013-11-03 01:59:59.999999-0400', tz='US/Eastern') ++ self.assertEqual(dt.tz_localize(None), dt.replace(tzinfo=None)) ++ ++ def test_ambiguous_compat(self): ++ # validate that pytz and dateutil are compat for dst ++ # when the transition happens ++ tm._skip_if_no_dateutil() ++ tm._skip_if_no_pytz() ++ ++ pytz_zone = 'Europe/London' ++ dateutil_zone = 'dateutil/Europe/London' ++ result_pytz = (Timestamp('2013-10-27 01:00:00') ++ .tz_localize(pytz_zone, ambiguous=0)) ++ result_dateutil = (Timestamp('2013-10-27 01:00:00') ++ .tz_localize(dateutil_zone, ambiguous=0)) ++ self.assertEqual(result_pytz.value, result_dateutil.value) ++ self.assertEqual(result_pytz.value, 1382835600000000000) ++ ++ # dateutil 2.6 buggy w.r.t. ambiguous=0 ++ if dateutil.__version__ != LooseVersion('2.6.0'): ++ # GH 14621 ++ # https://github.com/dateutil/dateutil/issues/321 ++ self.assertEqual(result_pytz.to_pydatetime().tzname(), ++ result_dateutil.to_pydatetime().tzname()) ++ self.assertEqual(str(result_pytz), str(result_dateutil)) ++ ++ # 1 hour difference ++ result_pytz = (Timestamp('2013-10-27 01:00:00') ++ .tz_localize(pytz_zone, ambiguous=1)) ++ result_dateutil = (Timestamp('2013-10-27 01:00:00') ++ .tz_localize(dateutil_zone, ambiguous=1)) ++ self.assertEqual(result_pytz.value, result_dateutil.value) ++ self.assertEqual(result_pytz.value, 1382832000000000000) ++ ++ # dateutil < 2.6 is buggy w.r.t. ambiguous timezones ++ if dateutil.__version__ > LooseVersion('2.5.3'): ++ # GH 14621 ++ self.assertEqual(str(result_pytz), str(result_dateutil)) ++ self.assertEqual(result_pytz.to_pydatetime().tzname(), ++ result_dateutil.to_pydatetime().tzname()) ++ + def test_index_equals_with_tz(self): + left = date_range('1/1/2011', periods=100, freq='H', tz='utc') + right = date_range('1/1/2011', periods=100, freq='H', tz='US/Eastern') +diff --git a/pandas/tseries/tests/test_tslib.py b/pandas/tseries/tests/test_tslib.py +index 21cfe84f1..b45f867be 100644 +--- a/pandas/tseries/tests/test_tslib.py ++++ b/pandas/tseries/tests/test_tslib.py +@@ -327,8 +327,9 @@ class TestTimestamp(tm.TestCase): + + # dateutil zone change (only matters for repr) + import dateutil +- if dateutil.__version__ >= LooseVersion( +- '2.3') and dateutil.__version__ <= LooseVersion('2.4.0'): ++ if (dateutil.__version__ >= LooseVersion('2.3') and ++ (dateutil.__version__ <= LooseVersion('2.4.0') or ++ dateutil.__version__ >= LooseVersion('2.6.0'))): + timezones = ['UTC', 'Asia/Tokyo', 'US/Eastern', + 'dateutil/US/Pacific'] + else: +diff --git a/pandas/tslib.pyx b/pandas/tslib.pyx +index d4eaaa0b5..685de214c 100644 +--- a/pandas/tslib.pyx ++++ b/pandas/tslib.pyx +@@ -98,6 +98,7 @@ except NameError: # py3 + cdef inline object create_timestamp_from_ts( + int64_t value, pandas_datetimestruct dts, + object tz, object freq): ++ """ convenience routine to construct a Timestamp from its parts """ + cdef _Timestamp ts_base + ts_base = _Timestamp.__new__(Timestamp, dts.year, dts.month, + dts.day, dts.hour, dts.min, +@@ -112,6 +113,7 @@ cdef inline object create_timestamp_from_ts( + cdef inline object create_datetime_from_ts( + int64_t value, pandas_datetimestruct dts, + object tz, object freq): ++ """ convenience routine to construct a datetime.datetime from its parts """ + return datetime(dts.year, dts.month, dts.day, dts.hour, + dts.min, dts.sec, dts.us, tz) + +@@ -378,7 +380,6 @@ class Timestamp(_Timestamp): + # Mixing pydatetime positional and keyword arguments is forbidden! + + cdef _TSObject ts +- cdef _Timestamp ts_base + + if offset is not None: + # deprecate offset kwd in 0.19.0, GH13593 +@@ -412,17 +413,7 @@ class Timestamp(_Timestamp): + from pandas.tseries.frequencies import to_offset + freq = to_offset(freq) + +- # make datetime happy +- ts_base = _Timestamp.__new__(cls, ts.dts.year, ts.dts.month, +- ts.dts.day, ts.dts.hour, ts.dts.min, +- ts.dts.sec, ts.dts.us, ts.tzinfo) +- +- # fill out rest of data +- ts_base.value = ts.value +- ts_base.freq = freq +- ts_base.nanosecond = ts.dts.ps / 1000 +- +- return ts_base ++ return create_timestamp_from_ts(ts.value, ts.dts, ts.tzinfo, freq) + + def _round(self, freq, rounder): + +@@ -660,8 +651,80 @@ class Timestamp(_Timestamp): + astimezone = tz_convert + + def replace(self, **kwds): +- return Timestamp(datetime.replace(self, **kwds), +- freq=self.freq) ++ """ ++ implements datetime.replace, handles nanoseconds ++ ++ Parameters ++ ---------- ++ kwargs: key-value dict ++ ++ accepted keywords are: ++ year, month, day, hour, minute, second, microsecond, nanosecond, tzinfo ++ ++ values must be integer, or for tzinfo, a tz-convertible ++ ++ Returns ++ ------- ++ Timestamp with fields replaced ++ """ ++ ++ cdef: ++ pandas_datetimestruct dts ++ int64_t value ++ object tzinfo, result, k, v ++ _TSObject ts ++ ++ # set to naive if needed ++ tzinfo = self.tzinfo ++ value = self.value ++ if tzinfo is not None: ++ value = tz_convert_single(value, 'UTC', tzinfo) ++ ++ # setup components ++ pandas_datetime_to_datetimestruct(value, PANDAS_FR_ns, &dts) ++ dts.ps = self.nanosecond * 1000 ++ ++ # replace ++ def validate(k, v): ++ """ validate integers """ ++ if not isinstance(v, int): ++ raise ValueError("value must be an integer, received {v} for {k}".format(v=type(v), k=k)) ++ return v ++ ++ for k, v in kwds.items(): ++ if k == 'year': ++ dts.year = validate(k, v) ++ elif k == 'month': ++ dts.month = validate(k, v) ++ elif k == 'day': ++ dts.day = validate(k, v) ++ elif k == 'hour': ++ dts.hour = validate(k, v) ++ elif k == 'minute': ++ dts.min = validate(k, v) ++ elif k == 'second': ++ dts.sec = validate(k, v) ++ elif k == 'microsecond': ++ dts.us = validate(k, v) ++ elif k == 'nanosecond': ++ dts.ps = validate(k, v) * 1000 ++ elif k == 'tzinfo': ++ tzinfo = v ++ else: ++ raise ValueError("invalid name {} passed".format(k)) ++ ++ # reconstruct & check bounds ++ value = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) ++ if value != NPY_NAT: ++ _check_dts_bounds(&dts) ++ ++ # set tz if needed ++ if tzinfo is not None: ++ value = tz_convert_single(value, tzinfo, 'UTC') ++ ++ result = create_timestamp_from_ts(value, dts, tzinfo, self.freq) ++ ++ return result + + def isoformat(self, sep='T'): + base = super(_Timestamp, self).isoformat(sep=sep) +@@ -5041,7 +5104,9 @@ cpdef normalize_date(object dt): + ------- + normalized : datetime.datetime or Timestamp + """ +- if PyDateTime_Check(dt): ++ if is_timestamp(dt): ++ return dt.replace(hour=0, minute=0, second=0, microsecond=0, nanosecond=0) ++ elif PyDateTime_Check(dt): + return dt.replace(hour=0, minute=0, second=0, microsecond=0) + elif PyDate_Check(dt): + return datetime(dt.year, dt.month, dt.day) +-- +2.11.0 + diff --git a/dev-python/pandas/metadata.xml b/dev-python/pandas/metadata.xml new file mode 100644 index 000000000000..2633bf05b9c0 --- /dev/null +++ b/dev-python/pandas/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <longdescription lang="en"> + Pandas is a Python package providing fast, flexible, and expressive + data structures designed to make working with "relational" or + "labeled" data both easy and intuitive. It aims to be the + fundamental high-level building block for doing practical, real + world data analysis in Python. +</longdescription> + <use> + <flag name="full-support">Pull all packages to give pandas full support</flag> + <flag name="excel">Pull a few Python packages for Microsoft Excel i/o</flag> + <flag name="html">Enable HTML i/o via <pkg>dev-python/beautifulsoup</pkg></flag> + <flag name="R">Enable support for R via <pkg>dev-python/rpy</pkg></flag> + </use> + <upstream> + <remote-id type="pypi">pandas</remote-id> + <remote-id type="github">pandas-dev/pandas</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/pandas/pandas-0.16.2.ebuild b/dev-python/pandas/pandas-0.16.2.ebuild new file mode 100644 index 000000000000..7b2da1706956 --- /dev/null +++ b/dev-python/pandas/pandas-0.16.2.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +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}] + " +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/xlrd[$(python_gen_usedep 'python2_7')] + dev-python/xlwt[$(python_gen_usedep 'python2_7')] + || ( + dev-python/xlsxwriter[${PYTHON_USEDEP}] + >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] + ) + ) + html? ( + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + || ( + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/html5lib[${PYTHON_USEDEP}] ) + ) + R? ( dev-python/rpy[${PYTHON_USEDEP}] )" + +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-0.17.0.ebuild b/dev-python/pandas/pandas-0.17.0.ebuild new file mode 100644 index 000000000000..22a63f27a32a --- /dev/null +++ b/dev-python/pandas/pandas-0.17.0.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +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}] + " +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/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_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + 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/xlrd[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + || ( + dev-python/xlsxwriter[${PYTHON_USEDEP}] + >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] + ) + ) + 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}-testfix-backport.patch +) + +python_prepare_all() { + # Prevent un-needed download during build + sed -e "/^ 'sphinx.ext.intersphinx',/d" -i doc/source/conf.py || die + + # https://github.com/pydata/pandas/issues/11299 + sed \ + -e 's:testOdArray:disable:g' \ + -i pandas/io/tests/test_json/test_ujson.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 + "${EPYTHON}" -c "import pandas; pandas.show_versions()" || die + VIRTUALX_COMMAND="nosetests" + PYTHONPATH=. MPLCONFIGDIR=. \ + 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-0.17.1.ebuild b/dev-python/pandas/pandas-0.17.1.ebuild new file mode 100644 index 000000000000..8ddf16d1d5b1 --- /dev/null +++ b/dev-python/pandas/pandas-0.17.1.ebuild @@ -0,0 +1,166 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +VIRTUALX_REQUIRED="manual" + +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 -minimal full-support test X" + +MINIMAL_DEPEND=" + >dev-python/numpy-1.7[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-2.0[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + !<dev-python/numexpr-2.1[${PYTHON_USEDEP}] + !~dev-python/openpyxl-1.9.0[${PYTHON_USEDEP}]" +RECOMMENDED_DEPEND=" + dev-python/bottleneck[${PYTHON_USEDEP}] + >=dev-python/numexpr-2.1[${PYTHON_USEDEP}]" +OPTIONAL_DEPEND=" + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/blosc[${PYTHON_USEDEP}] + dev-python/boto[${PYTHON_USEDEP}] + >=dev-python/google-api-python-client-1.2.0[$(python_gen_usedep python2_7 pypy)] + || ( dev-python/html5lib[${PYTHON_USEDEP}] dev-python/lxml[${PYTHON_USEDEP}] ) + dev-python/httplib2[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + || ( >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] dev-python/xlsxwriter[${PYTHON_USEDEP}] ) + >=dev-python/pytables-3.2.1[${PYTHON_USEDEP}] + dev-python/python-gflags[$(python_gen_usedep python2_7 pypy)] + dev-python/rpy[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/statsmodels[${PYTHON_USEDEP}] + >=dev-python/sqlalchemy-0.8.1[${PYTHON_USEDEP}] + dev-python/xlrd[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + X? ( + || ( + dev-python/PyQt4[${PYTHON_USEDEP}] + dev-python/pyside[${PYTHON_USEDEP}] + dev-python/pygtk[$(python_gen_usedep python2_7)] + ) + || ( + x11-misc/xclip + x11-misc/xsel + ) + ) + " + +DEPEND="${MINIMAL_DEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + >=dev-python/cython-0.19.1[${PYTHON_USEDEP}] + doc? ( + ${VIRTUALX_DEPEND} + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/html5lib[${PYTHON_USEDEP}] + dev-python/ipython[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] + >=dev-python/pytables-3.0.0[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/rpy[${PYTHON_USEDEP}] + >=dev-python/sphinx-1.2.1[${PYTHON_USEDEP}] + dev-python/xlrd[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + x11-misc/xclip + ) + test? ( + ${VIRTUALX_DEPEND} + ${RECOMMENDED_DEPEND} + ${OPTIONAL_DEPEND} + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + dev-python/pymysql[${PYTHON_USEDEP}] + dev-python/psycopg:2[${PYTHON_USEDEP}] + x11-misc/xclip + x11-misc/xsel + )" +# dev-python/statsmodels invokes a circular dep +# hence rm from doc? ( ), again +RDEPEND=" + ${MINIMAL_DEPEND} + !minimal? ( ${RECOMMENDED_DEPEND} ) + full-support? ( ${OPTIONAL_DEPEND} )" + +_PATCHES=( + "${FILESDIR}"/${P}-testfix-backport.patch +) + +python_prepare_all() { + # Prevent un-needed download during build + sed -e "/^ 'sphinx.ext.intersphinx',/d" -i doc/source/conf.py || die + + # https://github.com/pydata/pandas/issues/11299 + sed \ + -e 's:testOdArray:disable:g' \ + -i pandas/io/tests/test_json/test_ujson.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 + VIRTUALX_COMMAND="${EPYTHON}" + cd "${BUILD_DIR}"/lib || die + cp -ar "${S}"/doc . && cd doc || die + LANG=C PYTHONPATH=. virtualmake 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 + "${EPYTHON}" -c "import pandas; pandas.show_versions()" || die + VIRTUALX_COMMAND="nosetests" + PYTHONPATH=. MPLCONFIGDIR=. \ + 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() { + optfeature "accelerating certain types of NaN evaluations, using specialized cython routines to achieve large speedups." dev-python/bottleneck + optfeature "accelerating certain numerical operations, using multiple cores as well as smart chunking and caching to achieve large speedups" ">=dev-python/numexpr-2.1" + optfeature "needed for pandas.io.html.read_html" dev-python/beautifulsoup:4 dev-python/html5lib dev-python/lxml + optfeature "for msgpack compression using blosc" dev-python/blosc + optfeature "necessary for Amazon S3 access" dev-python/boto + optfeature "needed for pandas.io.gbq" dev-python/httplib2 dev-python/setuptools dev-python/python-gflags ">=dev-python/google-api-python-client-1.2.0" + optfeature "Template engine for conditional HTML formatting" dev-python/jinja + optfeature "Plotting support" dev-python/matplotlib + optfeature "Needed for Excel I/O" ">=dev-python/openpyxl-1.6.1" dev-python/xlsxwriter dev-python/xlrd dev-python/xlwt + optfeature "necessary for HDF5-based storage" ">=dev-python/pytables-3.2.1" + optfeature "R I/O support" dev-python/rpy + optfeature "Needed for parts of pandas.stats" dev-python/statsmodels + optfeature "SQL database support" ">=dev-python/sqlalchemy-0.8.1" + optfeature "miscellaneous statistical functions" sci-libs/scipy + optfeature "necessary to use pandas.io.clipboard.read_clipboard support" dev-python/PyQt4 dev-python/pyside dev-python/pygtk x11-misc/xclip x11-misc/xsel +} diff --git a/dev-python/pandas/pandas-0.19.1.ebuild b/dev-python/pandas/pandas-0.19.1.ebuild new file mode 100644 index 000000000000..4ed143486987 --- /dev/null +++ b/dev-python/pandas/pandas-0.19.1.ebuild @@ -0,0 +1,165 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +VIRTUALX_REQUIRED="manual" + +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 -minimal full-support test X" + +MINIMAL_DEPEND=" + >dev-python/numpy-1.7[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-2.0[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + !<dev-python/numexpr-2.1[${PYTHON_USEDEP}] + !~dev-python/openpyxl-1.9.0[${PYTHON_USEDEP}]" +RECOMMENDED_DEPEND=" + dev-python/bottleneck[${PYTHON_USEDEP}] + >=dev-python/numexpr-2.1[${PYTHON_USEDEP}]" +OPTIONAL_DEPEND=" + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/blosc[${PYTHON_USEDEP}] + dev-python/boto[${PYTHON_USEDEP}] + >=dev-python/google-api-python-client-1.2.0[$(python_gen_usedep python2_7 pypy)] + || ( dev-python/html5lib[${PYTHON_USEDEP}] dev-python/lxml[${PYTHON_USEDEP}] ) + dev-python/httplib2[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + || ( >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] dev-python/xlsxwriter[${PYTHON_USEDEP}] ) + >=dev-python/pytables-3.2.1[${PYTHON_USEDEP}] + dev-python/python-gflags[$(python_gen_usedep python2_7 pypy)] + dev-python/rpy[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/statsmodels[${PYTHON_USEDEP}] + >=dev-python/sqlalchemy-0.8.1[${PYTHON_USEDEP}] + dev-python/xlrd[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + X? ( + || ( + dev-python/PyQt4[${PYTHON_USEDEP}] + dev-python/pyside[${PYTHON_USEDEP}] + dev-python/pygtk[$(python_gen_usedep python2_7)] + ) + || ( + x11-misc/xclip + x11-misc/xsel + ) + ) + " + +DEPEND="${MINIMAL_DEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + >=dev-python/cython-0.19.1[${PYTHON_USEDEP}] + doc? ( + ${VIRTUALX_DEPEND} + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/html5lib[${PYTHON_USEDEP}] + dev-python/ipython[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] + >=dev-python/pytables-3.0.0[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/rpy[${PYTHON_USEDEP}] + >=dev-python/sphinx-1.2.1[${PYTHON_USEDEP}] + dev-python/xlrd[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + x11-misc/xclip + ) + test? ( + ${VIRTUALX_DEPEND} + ${RECOMMENDED_DEPEND} + ${OPTIONAL_DEPEND} + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + dev-python/pymysql[${PYTHON_USEDEP}] + dev-python/psycopg:2[${PYTHON_USEDEP}] + x11-misc/xclip + x11-misc/xsel + )" +# dev-python/statsmodels invokes a circular dep +# hence rm from doc? ( ), again +RDEPEND=" + ${MINIMAL_DEPEND} + !minimal? ( ${RECOMMENDED_DEPEND} ) + full-support? ( ${OPTIONAL_DEPEND} )" + +PATCHES=( + "${FILESDIR}"/${P}-gapi.patch + "${FILESDIR}"/${P}-seqf.patch +) + +python_prepare_all() { + # Prevent un-needed download during build + sed -e "/^ 'sphinx.ext.intersphinx',/d" -i doc/source/conf.py || die + + # https://github.com/pydata/pandas/issues/11299 + sed \ + -e 's:testOdArray:disable:g' \ + -i pandas/io/tests/json/test_ujson.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=. virtx ${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 + "${EPYTHON}" -c "import pandas; pandas.show_versions()" || die + PYTHONPATH=. MPLCONFIGDIR=. \ + virtx nosetests --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() { + optfeature "accelerating certain types of NaN evaluations, using specialized cython routines to achieve large speedups." dev-python/bottleneck + optfeature "accelerating certain numerical operations, using multiple cores as well as smart chunking and caching to achieve large speedups" ">=dev-python/numexpr-2.1" + optfeature "needed for pandas.io.html.read_html" dev-python/beautifulsoup:4 dev-python/html5lib dev-python/lxml + optfeature "for msgpack compression using blosc" dev-python/blosc + optfeature "necessary for Amazon S3 access" dev-python/boto + optfeature "needed for pandas.io.gbq" dev-python/httplib2 dev-python/setuptools dev-python/python-gflags ">=dev-python/google-api-python-client-1.2.0" + optfeature "Template engine for conditional HTML formatting" dev-python/jinja + optfeature "Plotting support" dev-python/matplotlib + optfeature "Needed for Excel I/O" ">=dev-python/openpyxl-1.6.1" dev-python/xlsxwriter dev-python/xlrd dev-python/xlwt + optfeature "necessary for HDF5-based storage" ">=dev-python/pytables-3.2.1" + optfeature "R I/O support" dev-python/rpy + optfeature "Needed for parts of pandas.stats" dev-python/statsmodels + optfeature "SQL database support" ">=dev-python/sqlalchemy-0.8.1" + optfeature "miscellaneous statistical functions" sci-libs/scipy + optfeature "necessary to use pandas.io.clipboard.read_clipboard support" dev-python/PyQt4 dev-python/pyside dev-python/pygtk x11-misc/xclip x11-misc/xsel +} diff --git a/dev-python/pandas/pandas-0.20.1.ebuild b/dev-python/pandas/pandas-0.20.1.ebuild new file mode 100644 index 000000000000..9e3b7f8bd657 --- /dev/null +++ b/dev-python/pandas/pandas-0.20.1.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +VIRTUALX_REQUIRED="manual" + +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 -minimal full-support test X" + +MINIMAL_DEPEND=" + >dev-python/numpy-1.7[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-2.0[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + !<dev-python/numexpr-2.1[${PYTHON_USEDEP}] + !~dev-python/openpyxl-1.9.0[${PYTHON_USEDEP}]" +RECOMMENDED_DEPEND=" + dev-python/bottleneck[${PYTHON_USEDEP}] + >=dev-python/numexpr-2.1[${PYTHON_USEDEP}]" +OPTIONAL_DEPEND=" + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/blosc[${PYTHON_USEDEP}] + dev-python/boto[${PYTHON_USEDEP}] + >=dev-python/google-api-python-client-1.2.0[$(python_gen_usedep python2_7 pypy)] + || ( dev-python/html5lib[${PYTHON_USEDEP}] dev-python/lxml[${PYTHON_USEDEP}] ) + dev-python/httplib2[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + || ( >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] dev-python/xlsxwriter[${PYTHON_USEDEP}] ) + >=dev-python/pytables-3.2.1[${PYTHON_USEDEP}] + dev-python/python-gflags[$(python_gen_usedep python2_7 pypy)] + dev-python/rpy[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/statsmodels[${PYTHON_USEDEP}] + >=dev-python/sqlalchemy-0.8.1[${PYTHON_USEDEP}] + dev-python/xlrd[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + X? ( + || ( + dev-python/PyQt4[${PYTHON_USEDEP}] + dev-python/pyside[${PYTHON_USEDEP}] + dev-python/pygtk[$(python_gen_usedep python2_7)] + ) + || ( + x11-misc/xclip + x11-misc/xsel + ) + ) + " + +DEPEND="${MINIMAL_DEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + >=dev-python/cython-0.23[${PYTHON_USEDEP}] + doc? ( + ${VIRTUALX_DEPEND} + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/html5lib[${PYTHON_USEDEP}] + dev-python/ipython[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] + >=dev-python/pytables-3.0.0[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/rpy[${PYTHON_USEDEP}] + >=dev-python/sphinx-1.2.1[${PYTHON_USEDEP}] + dev-python/xlrd[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + x11-misc/xclip + ) + test? ( + ${VIRTUALX_DEPEND} + ${RECOMMENDED_DEPEND} + ${OPTIONAL_DEPEND} + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + dev-python/pymysql[${PYTHON_USEDEP}] + dev-python/psycopg:2[${PYTHON_USEDEP}] + x11-misc/xclip + x11-misc/xsel + )" +# dev-python/statsmodels invokes a circular dep +# hence rm from doc? ( ), again +RDEPEND=" + ${MINIMAL_DEPEND} + !minimal? ( ${RECOMMENDED_DEPEND} ) + full-support? ( ${OPTIONAL_DEPEND} )" + +python_prepare_all() { + # Prevent un-needed download during build + sed \ + -e "/^ 'sphinx.ext.intersphinx',/d" \ + -i doc/source/conf.py || die + + # https://github.com/pydata/pandas/issues/11299 + sed \ + -e 's:testOdArray:disable:g' \ + -i pandas/tests/io/json/test_ujson.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=. virtx ${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 + "${EPYTHON}" -c "import pandas; pandas.show_versions()" || die + PYTHONPATH=. MPLCONFIGDIR=. \ + virtx nosetests --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() { + optfeature "accelerating certain types of NaN evaluations, using specialized cython routines to achieve large speedups." dev-python/bottleneck + optfeature "accelerating certain numerical operations, using multiple cores as well as smart chunking and caching to achieve large speedups" ">=dev-python/numexpr-2.1" + optfeature "needed for pandas.io.html.read_html" dev-python/beautifulsoup:4 dev-python/html5lib dev-python/lxml + optfeature "for msgpack compression using blosc" dev-python/blosc + optfeature "necessary for Amazon S3 access" dev-python/boto + optfeature "needed for pandas.io.gbq" dev-python/httplib2 dev-python/setuptools dev-python/python-gflags ">=dev-python/google-api-python-client-1.2.0" + optfeature "Template engine for conditional HTML formatting" dev-python/jinja + optfeature "Plotting support" dev-python/matplotlib + optfeature "Needed for Excel I/O" ">=dev-python/openpyxl-1.6.1" dev-python/xlsxwriter dev-python/xlrd dev-python/xlwt + optfeature "necessary for HDF5-based storage" ">=dev-python/pytables-3.2.1" + optfeature "R I/O support" dev-python/rpy + optfeature "Needed for parts of pandas.stats" dev-python/statsmodels + optfeature "SQL database support" ">=dev-python/sqlalchemy-0.8.1" + optfeature "miscellaneous statistical functions" sci-libs/scipy + optfeature "necessary to use pandas.io.clipboard.read_clipboard support" dev-python/PyQt4 dev-python/pyside dev-python/pygtk x11-misc/xclip x11-misc/xsel +} diff --git a/dev-python/pandas/pandas-0.20.3.ebuild b/dev-python/pandas/pandas-0.20.3.ebuild new file mode 100644 index 000000000000..a28647857c1c --- /dev/null +++ b/dev-python/pandas/pandas-0.20.3.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +VIRTUALX_REQUIRED="manual" + +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 -minimal full-support test X" + +MINIMAL_DEPEND=" + >dev-python/numpy-1.7[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-2.0[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + !<dev-python/numexpr-2.1[${PYTHON_USEDEP}] + !~dev-python/openpyxl-1.9.0[${PYTHON_USEDEP}]" +RECOMMENDED_DEPEND=" + dev-python/bottleneck[${PYTHON_USEDEP}] + >=dev-python/numexpr-2.1[${PYTHON_USEDEP}]" +OPTIONAL_DEPEND=" + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/blosc[${PYTHON_USEDEP}] + dev-python/boto[${PYTHON_USEDEP}] + >=dev-python/google-api-python-client-1.2.0[$(python_gen_usedep python2_7 pypy)] + || ( dev-python/html5lib[${PYTHON_USEDEP}] dev-python/lxml[${PYTHON_USEDEP}] ) + dev-python/httplib2[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + || ( >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] dev-python/xlsxwriter[${PYTHON_USEDEP}] ) + >=dev-python/pytables-3.2.1[${PYTHON_USEDEP}] + dev-python/python-gflags[$(python_gen_usedep python2_7 pypy)] + dev-python/rpy[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/statsmodels[${PYTHON_USEDEP}] + >=dev-python/sqlalchemy-0.8.1[${PYTHON_USEDEP}] + dev-python/xarray[${PYTHON_USEDEP}] + dev-python/xlrd[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + X? ( + || ( + dev-python/PyQt4[${PYTHON_USEDEP}] + dev-python/pyside[${PYTHON_USEDEP}] + dev-python/pygtk[$(python_gen_usedep python2_7)] + ) + || ( + x11-misc/xclip + x11-misc/xsel + ) + ) + " + +DEPEND="${MINIMAL_DEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + >=dev-python/cython-0.23[${PYTHON_USEDEP}] + doc? ( + ${VIRTUALX_DEPEND} + app-text/pandoc + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/html5lib[${PYTHON_USEDEP}] + dev-python/ipython[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] + >=dev-python/pytables-3.0.0[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/rpy[${PYTHON_USEDEP}] + >=dev-python/sphinx-1.2.1[${PYTHON_USEDEP}] + dev-python/xlrd[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + x11-misc/xclip + ) + test? ( + ${VIRTUALX_DEPEND} + ${RECOMMENDED_DEPEND} + ${OPTIONAL_DEPEND} + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + dev-python/pymysql[${PYTHON_USEDEP}] + dev-python/psycopg:2[${PYTHON_USEDEP}] + x11-misc/xclip + x11-misc/xsel + )" +# dev-python/statsmodels invokes a circular dep +# hence rm from doc? ( ), again +RDEPEND=" + ${MINIMAL_DEPEND} + !minimal? ( ${RECOMMENDED_DEPEND} ) + full-support? ( ${OPTIONAL_DEPEND} )" + +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=. virtx ${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 + "${EPYTHON}" -c "import pandas; pandas.show_versions()" || die + PYTHONPATH=. MPLCONFIGDIR=. \ + virtx nosetests --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() { + optfeature "accelerating certain types of NaN evaluations, using specialized cython routines to achieve large speedups." dev-python/bottleneck + optfeature "accelerating certain numerical operations, using multiple cores as well as smart chunking and caching to achieve large speedups" ">=dev-python/numexpr-2.1" + optfeature "needed for pandas.io.html.read_html" dev-python/beautifulsoup:4 dev-python/html5lib dev-python/lxml + optfeature "for msgpack compression using blosc" dev-python/blosc + optfeature "necessary for Amazon S3 access" dev-python/boto + optfeature "needed for pandas.io.gbq" dev-python/httplib2 dev-python/setuptools dev-python/python-gflags ">=dev-python/google-api-python-client-1.2.0" + optfeature "Template engine for conditional HTML formatting" dev-python/jinja + optfeature "Plotting support" dev-python/matplotlib + optfeature "Needed for Excel I/O" ">=dev-python/openpyxl-1.6.1" dev-python/xlsxwriter dev-python/xlrd dev-python/xlwt + optfeature "necessary for HDF5-based storage" ">=dev-python/pytables-3.2.1" + optfeature "R I/O support" dev-python/rpy + optfeature "Needed for parts of pandas.stats" dev-python/statsmodels + optfeature "SQL database support" ">=dev-python/sqlalchemy-0.8.1" + optfeature "miscellaneous statistical functions" sci-libs/scipy + optfeature "necessary to use pandas.io.clipboard.read_clipboard support" dev-python/PyQt4 dev-python/pyside dev-python/pygtk x11-misc/xclip x11-misc/xsel +} diff --git a/dev-python/pandas/pandas-9999.ebuild b/dev-python/pandas/pandas-9999.ebuild new file mode 100644 index 000000000000..c29b323ee1ac --- /dev/null +++ b/dev-python/pandas/pandas-9999.ebuild @@ -0,0 +1,163 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +VIRTUALX_REQUIRED="manual" + +inherit distutils-r1 eutils flag-o-matic git-r3 virtualx + +DESCRIPTION="Powerful data structures for data analysis and statistics" +HOMEPAGE="http://pandas.pydata.org/" +SRC_URI="" +EGIT_REPO_URI="https://github.com/pydata/pandas.git" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="" +IUSE="doc -minimal full-support test X" + +MINIMAL_DEPEND=" + >dev-python/numpy-1.7[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-2.0[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + !<dev-python/numexpr-2.1[${PYTHON_USEDEP}] + !~dev-python/openpyxl-1.9.0[${PYTHON_USEDEP}]" +RECOMMENDED_DEPEND=" + dev-python/bottleneck[${PYTHON_USEDEP}] + >=dev-python/numexpr-2.1[${PYTHON_USEDEP}]" +OPTIONAL_DEPEND=" + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/blosc[${PYTHON_USEDEP}] + dev-python/boto[${PYTHON_USEDEP}] + >=dev-python/google-api-python-client-1.2.0[$(python_gen_usedep python2_7 pypy)] + || ( dev-python/html5lib[${PYTHON_USEDEP}] dev-python/lxml[${PYTHON_USEDEP}] ) + dev-python/httplib2[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + || ( >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] dev-python/xlsxwriter[${PYTHON_USEDEP}] ) + >=dev-python/pytables-3.2.1[${PYTHON_USEDEP}] + dev-python/python-gflags[$(python_gen_usedep python2_7 pypy)] + dev-python/rpy[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/statsmodels[${PYTHON_USEDEP}] + >=dev-python/sqlalchemy-0.8.1[${PYTHON_USEDEP}] + dev-python/xlrd[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + X? ( + || ( + dev-python/PyQt4[${PYTHON_USEDEP}] + dev-python/pyside[${PYTHON_USEDEP}] + dev-python/pygtk[$(python_gen_usedep python2_7)] + ) + || ( + x11-misc/xclip + x11-misc/xsel + ) + ) + " + +DEPEND="${MINIMAL_DEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + >=dev-python/cython-0.23[${PYTHON_USEDEP}] + doc? ( + ${VIRTUALX_DEPEND} + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/html5lib[${PYTHON_USEDEP}] + dev-python/ipython[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}] + >=dev-python/pytables-3.0.0[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/rpy[${PYTHON_USEDEP}] + >=dev-python/sphinx-1.2.1[${PYTHON_USEDEP}] + dev-python/xlrd[${PYTHON_USEDEP}] + dev-python/xlwt[${PYTHON_USEDEP}] + sci-libs/scipy[${PYTHON_USEDEP}] + x11-misc/xclip + ) + test? ( + ${VIRTUALX_DEPEND} + ${RECOMMENDED_DEPEND} + ${OPTIONAL_DEPEND} + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + dev-python/pymysql[${PYTHON_USEDEP}] + dev-python/psycopg:2[${PYTHON_USEDEP}] + x11-misc/xclip + x11-misc/xsel + )" +# dev-python/statsmodels invokes a circular dep +# hence rm from doc? ( ), again +RDEPEND=" + ${MINIMAL_DEPEND} + !minimal? ( ${RECOMMENDED_DEPEND} ) + full-support? ( ${OPTIONAL_DEPEND} )" + +python_prepare_all() { + # Prevent un-needed download during build + sed \ + -e "/^ 'sphinx.ext.intersphinx',/d" \ + -i doc/source/conf.py || die + + # https://github.com/pydata/pandas/issues/11299 + sed \ + -e 's:testOdArray:disable:g' \ + -i pandas/tests/io/json/test_ujson.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=. virtx ${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 + "${EPYTHON}" -c "import pandas; pandas.show_versions()" || die + PYTHONPATH=. MPLCONFIGDIR=. \ + virtx nosetests --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() { + optfeature "accelerating certain types of NaN evaluations, using specialized cython routines to achieve large speedups." dev-python/bottleneck + optfeature "accelerating certain numerical operations, using multiple cores as well as smart chunking and caching to achieve large speedups" ">=dev-python/numexpr-2.1" + optfeature "needed for pandas.io.html.read_html" dev-python/beautifulsoup:4 dev-python/html5lib dev-python/lxml + optfeature "for msgpack compression using blosc" dev-python/blosc + optfeature "necessary for Amazon S3 access" dev-python/boto + optfeature "needed for pandas.io.gbq" dev-python/httplib2 dev-python/setuptools dev-python/python-gflags ">=dev-python/google-api-python-client-1.2.0" + optfeature "Template engine for conditional HTML formatting" dev-python/jinja + optfeature "Plotting support" dev-python/matplotlib + optfeature "Needed for Excel I/O" ">=dev-python/openpyxl-1.6.1" dev-python/xlsxwriter dev-python/xlrd dev-python/xlwt + optfeature "necessary for HDF5-based storage" ">=dev-python/pytables-3.2.1" + optfeature "R I/O support" dev-python/rpy + optfeature "Needed for parts of pandas.stats" dev-python/statsmodels + optfeature "SQL database support" ">=dev-python/sqlalchemy-0.8.1" + optfeature "miscellaneous statistical functions" sci-libs/scipy + optfeature "necessary to use pandas.io.clipboard.read_clipboard support" dev-python/PyQt4 dev-python/pyside dev-python/pygtk x11-misc/xclip x11-misc/xsel +} |