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