Сравнение pandas-2.0.3-r1 с pandas-2.1.0

/usr/portage/dev-python/pandas/pandas-2.1.0.ebuild 2023-10-09 14:52:30.320368371 +0300
4 4
EAPI=8
5 5

  
6 6
DISTUTILS_EXT=1
7
DISTUTILS_USE_PEP517=setuptools
7
DISTUTILS_USE_PEP517=meson-python
8 8
PYTHON_COMPAT=( python3_{10..11} )
9 9
PYTHON_REQ_USE="threads(+)"
10 10

  
11 11
VIRTUALX_REQUIRED="manual"
12 12

  
13
inherit distutils-r1 multiprocessing optfeature virtualx
13
inherit distutils-r1 multiprocessing optfeature pypi virtualx
14 14

  
15 15
DESCRIPTION="Powerful data structures for data analysis and statistics"
16 16
HOMEPAGE="
......
18 18
	https://github.com/pandas-dev/pandas/
19 19
	https://pypi.org/project/pandas/
20 20
"
21
SRC_URI="
22
	https://github.com/pandas-dev/pandas/releases/download/v${PV}/${P}.tar.gz
23
"
24
S=${WORKDIR}/${P/_/}
25 21

  
26 22
SLOT="0"
27 23
LICENSE="BSD"
28
KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~riscv ~x86 ~arm64-macos ~x64-macos"
29
IUSE="doc full-support minimal test X"
24
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~arm64-macos ~x64-macos"
25
IUSE="full-support minimal test X"
30 26
RESTRICT="!test? ( test )"
31 27

  
32 28
RECOMMENDED_DEPEND="
33
	>=dev-python/bottleneck-1.3.2[${PYTHON_USEDEP}]
34
	>=dev-python/numexpr-2.7.1[${PYTHON_USEDEP}]
29
	>=dev-python/bottleneck-1.3.4[${PYTHON_USEDEP}]
30
	>=dev-python/numexpr-2.8.0[${PYTHON_USEDEP}]
35 31
"
36 32

  
37 33
# TODO: add pandas-gbq to the tree
38 34
# TODO: Re-add dev-python/statsmodel[python3_11] dep once it supports python3_11
39 35
# https://github.com/statsmodels/statsmodels/issues/8287
40 36
OPTIONAL_DEPEND="
41
	>=dev-python/beautifulsoup4-4.9.3[${PYTHON_USEDEP}]
37
	>=dev-python/beautifulsoup4-4.11.1[${PYTHON_USEDEP}]
42 38
	dev-python/blosc[${PYTHON_USEDEP}]
43 39
	>=dev-python/html5lib-1.1[${PYTHON_USEDEP}]
44
	>=dev-python/jinja-3.0.0[${PYTHON_USEDEP}]
45
	>=dev-python/lxml-4.6.3[${PYTHON_USEDEP}]
40
	>=dev-python/jinja-3.1.2[${PYTHON_USEDEP}]
41
	>=dev-python/lxml-4.8.0[${PYTHON_USEDEP}]
46 42
	>=dev-python/matplotlib-3.6.1[${PYTHON_USEDEP}]
47 43
	>=dev-python/openpyxl-3.0.7[${PYTHON_USEDEP}]
48
	>=dev-python/sqlalchemy-1.4.16[${PYTHON_USEDEP}]
49
	>=dev-python/tables-3.6.1[${PYTHON_USEDEP}]
50
	>=dev-python/tabulate-0.8.9[${PYTHON_USEDEP}]
51
	>=dev-python/xarray-0.21.0[${PYTHON_USEDEP}]
44
	>=dev-python/sqlalchemy-1.4.36[${PYTHON_USEDEP}]
45
	>=dev-python/tables-3.7.0[${PYTHON_USEDEP}]
46
	>=dev-python/tabulate-0.8.10[${PYTHON_USEDEP}]
47
	>=dev-python/xarray-2022.3.0[${PYTHON_USEDEP}]
52 48
	>=dev-python/xlrd-2.0.1[${PYTHON_USEDEP}]
53
	>=dev-python/xlsxwriter-1.4.3[${PYTHON_USEDEP}]
49
	>=dev-python/xlsxwriter-3.0.3[${PYTHON_USEDEP}]
54 50
	>=dev-python/xlwt-1.3.0[${PYTHON_USEDEP}]
55 51
	!hppa? (
56 52
		$(python_gen_cond_dep '
57 53
			dev-python/statsmodels[${PYTHON_USEDEP}]
58 54
		' python3_{8..10} )
59
		>=dev-python/scipy-1.7.1[${PYTHON_USEDEP}]
55
		>=dev-python/scipy-1.8.1[${PYTHON_USEDEP}]
60 56
	)
61 57
	X? (
62 58
		|| (
63
			>=dev-python/PyQt5-5.15.1[${PYTHON_USEDEP}]
59
			>=dev-python/PyQt5-5.15.6[${PYTHON_USEDEP}]
64 60
			>=dev-python/QtPy-2.2.0[${PYTHON_USEDEP}]
65 61
			x11-misc/xclip
66 62
			x11-misc/xsel
......
75 71
	>=dev-python/python-dateutil-2.8.2[${PYTHON_USEDEP}]
76 72
	>=dev-python/pytz-2020.1[${PYTHON_USEDEP}]
77 73
"
78
# <cython-3: bug #898706
79 74
BDEPEND="
80 75
	${COMMON_DEPEND}
81 76
	>=dev-python/cython-0.29.33[${PYTHON_USEDEP}]
82
	<dev-python/cython-3[${PYTHON_USEDEP}]
83 77
	>=dev-python/versioneer-0.28[${PYTHON_USEDEP}]
84
	doc? (
85
		${VIRTUALX_DEPEND}
86
		>=dev-python/beautifulsoup4-4.9.3[${PYTHON_USEDEP}]
87
		>=dev-python/html5lib-1.1[${PYTHON_USEDEP}]
88
		dev-python/ipython[${PYTHON_USEDEP}]
89
		>=dev-python/lxml-4.6.3[${PYTHON_USEDEP}]
90
		>=dev-python/matplotlib-3.6.1[${PYTHON_USEDEP}]
91
		dev-python/nbsphinx[${PYTHON_USEDEP}]
92
		>=dev-python/numpydoc-0.9.1[${PYTHON_USEDEP}]
93
		>=dev-python/openpyxl-3.0.7[${PYTHON_USEDEP}]
94
		>=dev-python/tables-3.6.1[${PYTHON_USEDEP}]
95
		dev-python/pytz[${PYTHON_USEDEP}]
96
		dev-python/rpy[${PYTHON_USEDEP}]
97
		dev-python/sphinx[${PYTHON_USEDEP}]
98
		>=dev-python/xlrd-2.0.1[${PYTHON_USEDEP}]
99
		dev-python/xlwt[${PYTHON_USEDEP}]
100
		dev-python/scipy[${PYTHON_USEDEP}]
101
		virtual/pandoc
102
		x11-misc/xclip
103
	)
104 78
	test? (
105 79
		${VIRTUALX_DEPEND}
106 80
		${RECOMMENDED_DEPEND}
107 81
		${OPTIONAL_DEPEND}
108
		>=dev-python/beautifulsoup4-4.9.3[${PYTHON_USEDEP}]
109
		>=dev-python/hypothesis-6.34.2[${PYTHON_USEDEP}]
110
		>=dev-python/openpyxl-3.0.7[${PYTHON_USEDEP}]
82
		>=dev-python/beautifulsoup4-4.11.1[${PYTHON_USEDEP}]
83
		>=dev-python/hypothesis-6.46.1[${PYTHON_USEDEP}]
84
		>=dev-python/openpyxl-3.0.10[${PYTHON_USEDEP}]
111 85
		>=dev-python/pymysql-1.0.2[${PYTHON_USEDEP}]
112 86
		>=dev-python/pytest-7.3.2[${PYTHON_USEDEP}]
113 87
		>=dev-python/pytest-asyncio-0.17.0[${PYTHON_USEDEP}]
114 88
		>=dev-python/pytest-xdist-2.2.0[${PYTHON_USEDEP}]
115
		>=dev-python/psycopg-2.8.6:2[${PYTHON_USEDEP}]
116
		>=dev-python/xlsxwriter-1.4.3[${PYTHON_USEDEP}]
89
		>=dev-python/psycopg-2.9.3:2[${PYTHON_USEDEP}]
90
		>=dev-python/xlsxwriter-3.0.3[${PYTHON_USEDEP}]
91
		sys-apps/which
117 92
		x11-misc/xclip
118 93
		x11-misc/xsel
119 94
	)
120 95
"
121
# dev-python/statsmodels invokes a circular dep
122
#  hence rm from doc? ( ), again
123 96
RDEPEND="
124 97
	${COMMON_DEPEND}
125 98
	dev-python/tzdata[${PYTHON_USEDEP}]
......
127 100
	full-support? ( ${OPTIONAL_DEPEND} )
128 101
"
129 102

  
130
python_prepare_all() {
131
	# Prevent un-needed download during build
132
	sed -e "/^              'sphinx.ext.intersphinx',/d" \
133
		-i doc/source/conf.py || die
134

  
135
	distutils-r1_python_prepare_all
136
}
137

  
138
python_compile() {
139
	distutils-r1_python_compile -j1
140
}
141

  
142
python_compile_all() {
143
	# To build docs the need be located in $BUILD_DIR,
144
	# else PYTHONPATH points to unusable modules.
145
	if use doc; then
146
		cd "${BUILD_DIR}"/lib || die
147
		cp -ar "${S}"/doc . && cd doc || die
148
		LANG=C PYTHONPATH=. virtx ${EPYTHON} make.py html
149
	fi
150
}
103
PATCHES=(
104
	"${FILESDIR}/${P}-build-system.patch"
105
)
151 106

  
152 107
src_test() {
153 108
	virtx distutils-r1_src_test
......
158 113
		# test for rounding errors, fails if we have better precision
159 114
		# e.g. on amd64 with FMA or on arm64
160 115
		# https://github.com/pandas-dev/pandas/issues/38921
161
		pandas/tests/window/test_rolling.py::test_rolling_var_numerical_issues
116
		tests/window/test_rolling.py::test_rolling_var_numerical_issues
162 117

  
163
		# TODO
164
		pandas/tests/api/test_api.py::TestTesting::test_util_testing_deprecated
165
		pandas/tests/api/test_api.py::TestTesting::test_util_testing_deprecated_direct
166
		pandas/tests/io/test_clipboard.py::TestClipboard::test_raw_roundtrip
167
		pandas/tests/copy_view/test_internals.py::test_switch_options
168

  
169
		# TODO: xdist?
170
		pandas/tests/test_expressions.py::TestExpressions::test_run_binary
171

  
172
		# TODO: these require a running db server
173
		pandas/tests/io/test_sql.py::TestMySQLAlchemy
174
		pandas/tests/io/test_sql.py::TestMySQLAlchemyConn
175
		pandas/tests/io/test_sql.py::TestPostgreSQLAlchemy
176
		pandas/tests/io/test_sql.py::TestPostgreSQLAlchemyConn
118
		# TODO; unhappy about DISPLAY?
119
		tests/test_downstream.py::test_seaborn
177 120

  
178 121
		# OOMs
179
		pandas/tests/io/parser/test_c_parser_only.py::test_bytes_exceed_2gb
180

  
181
		# xarray version incompatibility
182
		pandas/tests/test_downstream.py::test_xarray_cftimeindex_nearest
183

  
184
		# warning from dask
185
		pandas/tests/test_downstream.py::test_construct_dask_float_array_int_dtype_match_ndarray
122
		tests/io/parser/test_c_parser_only.py::test_bytes_exceed_2gb
186 123

  
187
		# TODO: mpl incompatibility?
188
		pandas/tests/plotting/frame/test_frame.py::TestDataFramePlots::test_plain_axes
124
		# TODO: numexpr says "forbidden control characters"
125
		tests/computation/test_eval.py::TestOperations::test_multi_line_expression_local_variable
126
		'tests/computation/test_eval.py::test_query_token[numexpr-Temp(\xb0C)]'
127
		tests/frame/test_query_eval.py::TestDataFrameQueryBacktickQuoting::test_lots_of_operators_string
128
		tests/frame/test_query_eval.py::TestDataFrameQueryBacktickQuoting::test_multiple_spaces
129
		tests/frame/test_query_eval.py::TestDataFrameQueryBacktickQuoting::test_parenthesis
130
		tests/frame/test_query_eval.py::TestDataFrameQueryBacktickQuoting::test_start_with_spaces
131
		tests/frame/test_query_eval.py::TestDataFrameQueryNumExprPandas::test_local_syntax
132
		tests/frame/test_query_eval.py::TestDataFrameQueryNumExprPandas::test_local_variable_with_in
133
		tests/frame/test_query_eval.py::TestDataFrameQueryNumExprPandas::test_nested_scope
134
		tests/frame/test_query_eval.py::TestDataFrameQueryNumExprPandas::test_query_scope
135

  
136
		# TODO: missing data not covered by --no-strict-data-files?
137
		tests/io/xml/test_xml.py::test_empty_stylesheet
138
		tests/io/xml/test_xml.py::test_wrong_file_path
189 139

  
190
		# crashes
191
		pandas/tests/io/pytables/test_file_handling.py::test_complibs
140
		# TODO
141
		tests/frame/test_arithmetic.py::TestFrameFlexArithmetic::test_floordiv_axis0_numexpr_path
192 142

  
193 143
		# deprecation warning
194
		pandas/tests/io/pytables/test_retain_attributes.py::test_retain_index_attributes2
144
		tests/io/pytables/test_retain_attributes.py::test_retain_index_attributes2
195 145

  
196 146
		# Needs 64-bit time_t (TODO: split into 32-bit arch only section)
197
		pandas/tests/tseries/offsets/test_year.py::test_add_out_of_pydatetime_range
198
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessDay]'
199
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessHour]'
200
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessMonthEnd]'
201
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessMonthBegin]'
202
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BQuarterEnd]'
203
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BQuarterBegin]'
204
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessDay]'
205
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessHour]'
206
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessMonthEnd]'
207
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessMonthBegin]'
208
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-MonthEnd]'
209
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-MonthBegin]'
210
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-SemiMonthBegin]'
211
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-SemiMonthEnd]'
212
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-QuarterEnd]'
213
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-LastWeekOfMonth]'
214
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-WeekOfMonth]'
215
		'pandas/tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-Week]'
216

  
217
		# alignment issues: bug #911660 (fixed upstream but not yet in a release)
218
		# https://github.com/pandas-dev/pandas/issues/54391
219
		pandas/tests/io/sas/test_byteswap.py::test_float_byteswap
147
		tests/tseries/offsets/test_year.py::test_add_out_of_pydatetime_range
148
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessDay]'
149
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessHour]'
150
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessMonthEnd]'
151
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BusinessMonthBegin]'
152
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BQuarterEnd]'
153
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-BQuarterBegin]'
154
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessDay]'
155
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessHour]'
156
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessMonthEnd]'
157
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-CustomBusinessMonthBegin]'
158
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-MonthEnd]'
159
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-MonthBegin]'
160
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-SemiMonthBegin]'
161
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-SemiMonthEnd]'
162
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-QuarterEnd]'
163
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-LastWeekOfMonth]'
164
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-WeekOfMonth]'
165
		'tests/tseries/offsets/test_common.py::test_apply_out_of_range[tzlocal()-Week]'
220 166

  
221 167
		# hdf / pytables have alignment problems: bug #911660
222 168
		# https://github.com/pandas-dev/pandas/issues/54396
223
		pandas/tests/io/pytables/test_append.py::test_append_frame_column_oriented
224
		pandas/tests/io/pytables/test_store.py::test_select_filter_corner
169
		tests/io/pytables/test_append.py::test_append_frame_column_oriented
170
		tests/io/pytables/test_store.py::test_select_filter_corner
225 171
	)
226 172

  
227 173
	local -x LC_ALL=C.UTF-8
228 174
	cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
229 175
	"${EPYTHON}" -c "import pandas; pandas.show_versions()" || die
230
	epytest pandas --skip-slow --skip-network -m "not single" \
231
		-n "$(makeopts_jobs)" || die "Tests failed with ${EPYTHON}"
232
}
233

  
234
python_install_all() {
235
	if use doc; then
236
		dodoc -r "${BUILD_DIR}"/lib/doc/build/html
237
		einfo "An initial build of docs is absent of references to statsmodels"
238
		einfo "due to circular dependency. To have them included, emerge"
239
		einfo "statsmodels next and re-emerge pandas with USE doc"
240
	fi
241

  
242
	distutils-r1_python_install_all
176
	# --no-strict-data-files is necessary since upstream prevents data
177
	# files from even being included in GitHub archives, sigh
178
	# https://github.com/pandas-dev/pandas/issues/54907
179
	epytest pandas/tests \
180
		--no-strict-data-files \
181
		--maxfail=32 \
182
		-m "not single and not slow and not network" \
183
		-n "$(makeopts_jobs)" --dist=worksteal ||
184
		die "Tests failed with ${EPYTHON}"
185
	rm test-data.xml || die
243 186
}
244 187

  
245 188
pkg_postinst() {
......
249 192
	optfeature "for msgpack compression using blosc" dev-python/blosc
250 193
	optfeature "Template engine for conditional HTML formatting" dev-python/jinja
251 194
	optfeature "Plotting support" dev-python/matplotlib
252
	optfeature "Needed for Excel I/O" ">=dev-python/openpyxl-3.0.7" dev-python/xlsxwriter dev-python/xlrd dev-python/xlwt
253
	optfeature "necessary for HDF5-based storage" ">=dev-python/tables-3.6.1"
195
	optfeature "Needed for Excel I/O" ">=dev-python/openpyxl-3.0.10" dev-python/xlsxwriter dev-python/xlrd dev-python/xlwt
196
	optfeature "necessary for HDF5-based storage" ">=dev-python/tables-3.7.0"
254 197
	optfeature "R I/O support" dev-python/rpy
255 198
	optfeature "Needed for parts of pandas.stats" dev-python/statsmodels
256
	optfeature "SQL database support" ">=dev-python/sqlalchemy-1.4.16"
199
	optfeature "SQL database support" ">=dev-python/sqlalchemy-1.4.36"
257 200
	optfeature "miscellaneous statistical functions" dev-python/scipy
258 201
	optfeature "necessary to use pandas.io.clipboard.read_clipboard support" dev-python/PyQt5 dev-python/QtPy dev-python/pygtk x11-misc/xclip x11-misc/xsel
259 202
}
Спасибо!