Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pandas/
Date: Thu, 22 Sep 2022 18:23:41
Message-Id: 1663871012.4cb7e601b2861d5de0aa2e43bed02b6feea24ec6.mgorny@gentoo
1 commit: 4cb7e601b2861d5de0aa2e43bed02b6feea24ec6
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 22 16:14:35 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 22 18:23:32 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4cb7e601
7
8 dev-python/pandas: Bump to 1.5.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pandas/Manifest | 1 +
13 dev-python/pandas/pandas-1.5.0.ebuild | 201 ++++++++++++++++++++++++++++++++++
14 2 files changed, 202 insertions(+)
15
16 diff --git a/dev-python/pandas/Manifest b/dev-python/pandas/Manifest
17 index 65dc7f7acf85..77b66ec4ccdd 100644
18 --- a/dev-python/pandas/Manifest
19 +++ b/dev-python/pandas/Manifest
20 @@ -1,2 +1,3 @@
21 DIST pandas-1.4.3.tar.gz 4941520 BLAKE2B b134f7c04c2478b7105214ed62e9adcaed98ffb4179a785f7887850d66702bf0f185d60a3da6de6226742529008bac614b494453dca929e477960ff3b43ef93d SHA512 d8d7575ce2b813361641d4e438844e03ed79179f5dcc56f2e4923bfeceab6f825a9bcc419e9492ee5e0272ea7c9bb9eeab6a0e242a880a87999df2a492436d8e
22 DIST pandas-1.4.4.tar.gz 4949620 BLAKE2B 7ce236ae28ed6c6857a3acf6936aad2b1dc53a048986809d8dedbb9595dd2234bacbe114b74d8a171a6b31254372ea262566b134e7b5b24d5d4666938c7e6154 SHA512 a12e92dd751ed2342d9291724833732cdadbc9791e59533b9efded570b9893bacbe2f10e6bc70d673adb9356dcb0ae3d64d8a1dfe6ae8a3c70e474556ded4d91
23 +DIST pandas-1.5.0.tar.gz 5191537 BLAKE2B c7dec1d0197e6ac860667177f0f255bb327dbd48fe4501280d578b93f4496e61c0847dc478effeb8c5729d7a9d3e8a643c01db095a9843d6d211a9420f94d42c SHA512 8d340da1e0dff9b64c8993359b35ddcfc796fa15fee1bf1a27ea5a12e33f8b20d45bfac0ff9275b16ff0d4f7855a73962629e06c62bc08ca5e21b4ef1ea29ec2
24
25 diff --git a/dev-python/pandas/pandas-1.5.0.ebuild b/dev-python/pandas/pandas-1.5.0.ebuild
26 new file mode 100644
27 index 000000000000..c4c60fd4f595
28 --- /dev/null
29 +++ b/dev-python/pandas/pandas-1.5.0.ebuild
30 @@ -0,0 +1,201 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +DISTUTILS_USE_PEP517=setuptools
37 +PYTHON_COMPAT=( python3_{8..10} )
38 +PYTHON_REQ_USE="threads(+)"
39 +
40 +VIRTUALX_REQUIRED="manual"
41 +
42 +inherit distutils-r1 multiprocessing optfeature virtualx
43 +
44 +DESCRIPTION="Powerful data structures for data analysis and statistics"
45 +HOMEPAGE="https://pandas.pydata.org/
46 + https://github.com/pandas-dev/pandas/"
47 +SRC_URI="
48 + https://github.com/pandas-dev/pandas/releases/download/v${PV}/${P}.tar.gz
49 +"
50 +S="${WORKDIR}/${P/_/}"
51 +
52 +SLOT="0"
53 +LICENSE="BSD"
54 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
55 +IUSE="doc full-support minimal test X"
56 +RESTRICT="!test? ( test )"
57 +
58 +RECOMMENDED_DEPEND="
59 + >=dev-python/bottleneck-1.2.1[${PYTHON_USEDEP}]
60 + >=dev-python/numexpr-2.7.0[${PYTHON_USEDEP}]
61 +"
62 +
63 +# TODO: add pandas-gbq to the tree
64 +OPTIONAL_DEPEND="
65 + dev-python/beautifulsoup4[${PYTHON_USEDEP}]
66 + dev-python/blosc[${PYTHON_USEDEP}]
67 + || (
68 + dev-python/html5lib[${PYTHON_USEDEP}]
69 + dev-python/lxml[${PYTHON_USEDEP}]
70 + )
71 + dev-python/jinja[${PYTHON_USEDEP}]
72 + dev-python/matplotlib[${PYTHON_USEDEP}]
73 + || (
74 + dev-python/openpyxl[${PYTHON_USEDEP}]
75 + dev-python/xlsxwriter[${PYTHON_USEDEP}]
76 + )
77 + >=dev-python/pytables-3.2.1[${PYTHON_USEDEP}]
78 + >=dev-python/xarray-0.12.3[${PYTHON_USEDEP}]
79 + >=dev-python/sqlalchemy-1.3.0[${PYTHON_USEDEP}]
80 + >=dev-python/xlrd-1.2.0[${PYTHON_USEDEP}]
81 + >=dev-python/xlwt-1.3.0[${PYTHON_USEDEP}]
82 + !hppa? (
83 + dev-python/statsmodels[${PYTHON_USEDEP}]
84 + >=dev-python/scipy-1.1[${PYTHON_USEDEP}]
85 + )
86 + X? (
87 + || (
88 + dev-python/PyQt5[${PYTHON_USEDEP}]
89 + x11-misc/xclip
90 + x11-misc/xsel
91 + )
92 + )
93 +"
94 +COMMON_DEPEND="
95 + >=dev-python/numpy-1.21.0[${PYTHON_USEDEP}]
96 + >=dev-python/python-dateutil-2.8.1-r3[${PYTHON_USEDEP}]
97 + >=dev-python/pytz-2020.1[${PYTHON_USEDEP}]
98 +"
99 +DEPEND="
100 + ${COMMON_DEPEND}
101 + >=dev-python/cython-0.29.32[${PYTHON_USEDEP}]
102 + doc? (
103 + ${VIRTUALX_DEPEND}
104 + app-text/pandoc
105 + dev-python/beautifulsoup4[${PYTHON_USEDEP}]
106 + dev-python/html5lib[${PYTHON_USEDEP}]
107 + dev-python/ipython[${PYTHON_USEDEP}]
108 + dev-python/lxml[${PYTHON_USEDEP}]
109 + dev-python/matplotlib[${PYTHON_USEDEP}]
110 + dev-python/nbsphinx[${PYTHON_USEDEP}]
111 + >=dev-python/numpydoc-0.9.1[${PYTHON_USEDEP}]
112 + >=dev-python/openpyxl-1.6.1[${PYTHON_USEDEP}]
113 + >=dev-python/pytables-3.0.0[${PYTHON_USEDEP}]
114 + dev-python/pytz[${PYTHON_USEDEP}]
115 + dev-python/rpy[${PYTHON_USEDEP}]
116 + dev-python/sphinx[${PYTHON_USEDEP}]
117 + dev-python/xlrd[${PYTHON_USEDEP}]
118 + dev-python/xlwt[${PYTHON_USEDEP}]
119 + dev-python/scipy[${PYTHON_USEDEP}]
120 + x11-misc/xclip
121 + )
122 + test? (
123 + ${VIRTUALX_DEPEND}
124 + ${RECOMMENDED_DEPEND}
125 + ${OPTIONAL_DEPEND}
126 + dev-python/beautifulsoup4[${PYTHON_USEDEP}]
127 + >=dev-python/hypothesis-5.5.3[${PYTHON_USEDEP}]
128 + dev-python/openpyxl[${PYTHON_USEDEP}]
129 + dev-python/pymysql[${PYTHON_USEDEP}]
130 + >=dev-python/pytest-6[${PYTHON_USEDEP}]
131 + >=dev-python/pytest-xdist-1.31[${PYTHON_USEDEP}]
132 + dev-python/psycopg:2[${PYTHON_USEDEP}]
133 + dev-python/xlsxwriter[${PYTHON_USEDEP}]
134 + x11-misc/xclip
135 + x11-misc/xsel
136 + )
137 +"
138 +# dev-python/statsmodels invokes a circular dep
139 +# hence rm from doc? ( ), again
140 +RDEPEND="
141 + ${COMMON_DEPEND}
142 + !minimal? ( ${RECOMMENDED_DEPEND} )
143 + full-support? ( ${OPTIONAL_DEPEND} )
144 +"
145 +
146 +python_prepare_all() {
147 + # Prevent un-needed download during build
148 + sed -e "/^ 'sphinx.ext.intersphinx',/d" \
149 + -i doc/source/conf.py || die
150 +
151 + # requires package installed
152 + sed -e '/extra_compile_args =/s:"-Werror"::' \
153 + -i setup.py || die
154 +
155 + distutils-r1_python_prepare_all
156 +}
157 +
158 +python_compile() {
159 + distutils-r1_python_compile -j1
160 +}
161 +
162 +python_compile_all() {
163 + # To build docs the need be located in $BUILD_DIR,
164 + # else PYTHONPATH points to unusable modules.
165 + if use doc; then
166 + cd "${BUILD_DIR}"/lib || die
167 + cp -ar "${S}"/doc . && cd doc || die
168 + LANG=C PYTHONPATH=. virtx ${EPYTHON} make.py html
169 + fi
170 +}
171 +
172 +src_test() {
173 + virtx distutils-r1_src_test
174 +}
175 +
176 +python_test() {
177 + local EPYTEST_DESELECT=(
178 + # test for rounding errors, fails if we have better precision
179 + # e.g. on amd64 with FMA or on arm64
180 + # https://github.com/pandas-dev/pandas/issues/38921
181 + pandas/tests/window/test_rolling.py::test_rolling_var_numerical_issues
182 +
183 + # TODO
184 + pandas/tests/api/test_api.py::TestTesting::test_util_testing_deprecated
185 + pandas/tests/api/test_api.py::TestTesting::test_util_testing_deprecated_direct
186 + pandas/tests/io/test_clipboard.py::TestClipboard::test_raw_roundtrip
187 +
188 + # TODO: xdist?
189 + pandas/tests/test_expressions.py::TestExpressions::test_run_binary
190 +
191 + # TODO: these require a running db server
192 + pandas/tests/io/test_sql.py::TestMySQLAlchemy
193 + pandas/tests/io/test_sql.py::TestMySQLAlchemyConn
194 + pandas/tests/io/test_sql.py::TestPostgreSQLAlchemy
195 + pandas/tests/io/test_sql.py::TestPostgreSQLAlchemyConn
196 + )
197 +
198 + local -x LC_ALL=C.UTF-8
199 + cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
200 + "${EPYTHON}" -c "import pandas; pandas.show_versions()" || die
201 + epytest pandas --skip-slow --skip-network -m "not single" \
202 + -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" ||
203 + die "Tests failed with ${EPYTHON}"
204 +}
205 +
206 +python_install_all() {
207 + if use doc; then
208 + dodoc -r "${BUILD_DIR}"/lib/doc/build/html
209 + einfo "An initial build of docs is absent of references to statsmodels"
210 + einfo "due to circular dependency. To have them included, emerge"
211 + einfo "statsmodels next and re-emerge pandas with USE doc"
212 + fi
213 +
214 + distutils-r1_python_install_all
215 +}
216 +
217 +pkg_postinst() {
218 + optfeature "accelerating certain types of NaN evaluations, using specialized cython routines to achieve large speedups." dev-python/bottleneck
219 + optfeature "accelerating certain numerical operations, using multiple cores as well as smart chunking and caching to achieve large speedups" ">=dev-python/numexpr-2.1"
220 + optfeature "needed for pandas.io.html.read_html" dev-python/beautifulsoup4 dev-python/html5lib dev-python/lxml
221 + optfeature "for msgpack compression using blosc" dev-python/blosc
222 + optfeature "Template engine for conditional HTML formatting" dev-python/jinja
223 + optfeature "Plotting support" dev-python/matplotlib
224 + optfeature "Needed for Excel I/O" ">=dev-python/openpyxl-3.0.0" dev-python/xlsxwriter dev-python/xlrd dev-python/xlwt
225 + optfeature "necessary for HDF5-based storage" ">=dev-python/pytables-3.2.1"
226 + optfeature "R I/O support" dev-python/rpy
227 + optfeature "Needed for parts of pandas.stats" dev-python/statsmodels
228 + optfeature "SQL database support" ">=dev-python/sqlalchemy-1.3.0"
229 + optfeature "miscellaneous statistical functions" dev-python/scipy
230 + optfeature "necessary to use pandas.io.clipboard.read_clipboard support" dev-python/PyQt5 dev-python/pygtk x11-misc/xclip x11-misc/xsel
231 +}