diff options
| author | Crucible <crucible@localhost> | 2026-10-07 03:05:00 -0500 |
|---|---|---|
| committer | Crucible <crucible@localhost> | 2026-10-07 03:05:00 -0500 |
| commit | 4f8f07779b4dd78123821b104e43fd1eb15281dd (patch) | |
| tree | 50283d655e8953ffa4cd36a42b39f72f09fed20b /dev-python/polars | |
| parent | 21cec7ace42ae94a3a1b32ecec396a199eebf3c9 (diff) | |
| download | srcux-4f8f07779b4dd78123821b104e43fd1eb15281dd.tar.gz srcux-4f8f07779b4dd78123821b104e43fd1eb15281dd.tar.xz srcux-4f8f07779b4dd78123821b104e43fd1eb15281dd.zip | |
Publish srcux candidate 0000000583-20261007-030305
Diffstat (limited to 'dev-python/polars')
| -rw-r--r-- | dev-python/polars/Manifest | 3 | ||||
| -rw-r--r-- | dev-python/polars/polars-2.0.0.ebuild | 228 |
2 files changed, 231 insertions, 0 deletions
diff --git a/dev-python/polars/Manifest b/dev-python/polars/Manifest index 5bb1bf8b2496..17202b8cf106 100644 --- a/dev-python/polars/Manifest +++ b/dev-python/polars/Manifest @@ -1,5 +1,8 @@ DIST arrow-rs-object-store-b07471e2bc341278f86e30cf80a850d56cbe2c67.gh.tar.gz 342282 BLAKE2B 47a1549d13db745d61566a55a471a85976d13852fd9ad8a241b0cf6be94ea586930575a842e0a6f10b534f0bb1a42225c0ddfae705f759e32ddc7345b137f803 SHA512 14cb3283ae64efcbe122b1ba3df9537e350e2480d5888a2a3a97979658bc0bb50773e1535f86cb12a919a8b5d14224d4f114facf3510f3b167b4e3b5a013c346 DIST color-backtrace-20f5eea183563bb4cfac9a4d65901d4a1002cde2.gh.tar.gz 19183 BLAKE2B d73eb07c25275dfe4ca9a436f840aac670574c3cbd5a0eba5ebdc2405bd6f6a6638307ea9b89ea407e8023f4cdb0e2ea5d2e295fb065d63091109f4e3079a714 SHA512 c1843889f4a9ea5f515cb374f6a8a011bf000836a772263eef023b0173fcb5986426f919cdd4369f18687f46f2fcc712d8f6efdc698b4605a5358c230adb2baf +DIST hashbrown-d76a6f81abd8f388676aff15068236a8d21c7e1a.gh.tar.gz 162763 BLAKE2B 3bd14ae6c142c03753fbe840573351343a99090557572021dd9adf3dea95b6f3db537c5824e477d963f6885501dd76aaac33cccc024ef31ce6a55e1f44623ef9 SHA512 073db4123ff97fdb5f5b3a420e1aa9c97d5dcaf50858a66006a1fa41b76f91e67f8611aa8b4d78af99df58d8eedbc14fe358576768e8bfc35f1df48373efd0fc DIST jemallocator-0d683dfb157097e2075d5e0eaf25f71f514a7552.gh.tar.gz 143641 BLAKE2B 9b160f6b8364a0800c5f8ce4ab532e19ad57161d484d60c5b4dfaa0c59e228dc16d83b99ee93c85b0a44fe8f139baab8a7e10b51eaee14d45240c8bf9e63f9f1 SHA512 1c810eb25e9e8e7724205bdcb86a66dfca082be50829cda0fe54c2cd340f50dc6a8ff3b04026917d12c051790efa08b687093db4b11de8380c0e5c66528fc683 DIST polars-py-1.44.2-crates.tar.xz 43678932 BLAKE2B 533d19d9186fe72505f4a22a8a644151ca90157c14af94450ee5185dffa76d44ab190f79558ffc5e7b3696c85ef70c9ede917033c3cb26a09ea23e9625b40773 SHA512 75e90447ad6490fe6d151c7aa16626075297edfa35645dc183f0114a85261f632d401c091fb1653c4305f433893ab0638d619056b5b447bd95379e1902ada312 DIST polars-py-1.44.2.gh.tar.gz 5454913 BLAKE2B 0e1f5dc10f83d11b144dd2b63181986054c44e510883b6a6bdd6cc6768e366c37edf4e2a62408835474d098ae40e357556243e1120bf2395bc4d327c37f00c0f SHA512 015a08c9113ab0e8725384e52b4d272657c98376f3cfc83c400a74ff229bc4d1cff5f9f3fc6c7de89c3be052b38ede255152d0965a9368faf2b6fec9ea3efe2f +DIST polars-py-2.0.0-crates.tar.xz 43867792 BLAKE2B e006c6e36fc932006ddec2673edf54eab8a0a249859405fc23d6c575cfdc86335ead6b7810fc3bb002785862c8bee5b1ad5c2fa460b92be4dc2991d45be23a77 SHA512 f3e949b69153b280bda96d2e9100c8deb393dcfc333aea6d9c7cd64dbb5c6749e99033f0618596920eae472321018a5da395beab75fa6ba17ba7732bb1107714 +DIST polars-py-2.0.0.gh.tar.gz 6140107 BLAKE2B 245425d225b89f9554e4eb704d0451d3a7ca6054ce6c5f5f88c2d2f9847e32a2b6473b26258f679ca7924dd15c649341903b6a35f88e24b50e18b041f454b5ba SHA512 efdceda5617549ad9c43739022eab4c1cae6fe8b087f8f2a7ebdc375a5248b8aae7c2011a53459dccb624bcccd8ee5f83fcf7e502b41a3a34f2af58487530d53 diff --git a/dev-python/polars/polars-2.0.0.ebuild b/dev-python/polars/polars-2.0.0.ebuild new file mode 100644 index 000000000000..b8a87318ee68 --- /dev/null +++ b/dev-python/polars/polars-2.0.0.ebuild @@ -0,0 +1,228 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" +" +RUST_MIN_VER="1.95" + +declare -A GIT_CRATES=( + [color-backtrace]='https://github.com/orlp/color-backtrace;20f5eea183563bb4cfac9a4d65901d4a1002cde2;color-backtrace-%commit%' + [hashbrown]='https://github.com/pola-rs/hashbrown;d76a6f81abd8f388676aff15068236a8d21c7e1a;hashbrown-%commit%' + [tikv-jemalloc-sys]='https://github.com/pola-rs/jemallocator;0d683dfb157097e2075d5e0eaf25f71f514a7552;jemallocator-%commit%/jemalloc-sys' +) + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit cargo distutils-r1 + +MY_P=polars-py-${PV} +DESCRIPTION="Extremely fast Query Engine for DataFrames, written in Rust" +HOMEPAGE=" + https://github.com/pola-rs/polars/ + https://pypi.org/project/polars/ +" +SRC_URI=" + https://github.com/pola-rs/polars/archive/refs/tags/py-${PV}.tar.gz + -> ${MY_P}.gh.tar.gz + https://github.com/gentoo-crate-dist/polars/releases/download/py-${PV}/${MY_P}-crates.tar.xz + ${CARGO_CRATE_URIS} +" +S=${WORKDIR}/${MY_P}/py-polars + +LICENSE="MIT" +# Dependent crate licenses +LICENSE+=" + Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0 + CDLA-Permissive-2.0 ISC MIT Unicode-3.0 ZLIB +" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + app-arch/lz4:= + app-arch/zstd:= +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + dev-util/maturin[${PYTHON_USEDEP}] + test? ( + app-text/xlsx2csv[${PYTHON_USEDEP}] + dev-libs/apache-arrow[lz4,parquet,zlib,zstd] + dev-python/aiosqlite[${PYTHON_USEDEP}] + dev-python/boto3[${PYTHON_USEDEP}] + dev-python/cloudpickle[${PYTHON_USEDEP}] + dev-python/fastexcel[${PYTHON_USEDEP}] + dev-python/flask[${PYTHON_USEDEP}] + dev-python/flask-cors[${PYTHON_USEDEP}] + dev-python/fsspec[${PYTHON_USEDEP}] + dev-python/google-auth[${PYTHON_USEDEP}] + dev-python/greenlet[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + dev-python/moto[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/openpyxl[${PYTHON_USEDEP}] + dev-python/orjson[${PYTHON_USEDEP}] + dev-python/pandas[${PYTHON_USEDEP}] + dev-python/pyarrow[parquet,${PYTHON_USEDEP}] + dev-python/pydantic[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/sqlalchemy[${PYTHON_USEDEP}] + dev-python/xlsxwriter[${PYTHON_USEDEP}] + dev-python/zstandard[${PYTHON_USEDEP}] + media-gfx/graphviz + ) +" + +EPYTEST_PLUGINS=( hypothesis ) +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +DOCS=( ../README.md ) + +src_prepare() { + distutils-r1_src_prepare + + # ofc upstream must be patching crates + local crate + for crate in "${!GIT_CRATES[@]}"; do + local override=$( + grep "^${crate} =" "${ECARGO_HOME}"/config.toml || die + ) + sed -i -e "s@^${crate} = { git.*\$@${override}@" ../Cargo.toml || die + done + + # https://github.com/10XGenomics/lz4-rs/pull/39 + pushd "${ECARGO_VENDOR}"/lz4-sys* >/dev/null || Die + eapply -p2 "${FILESDIR}/lz4-sys-unbundle-lz4.patch" + popd >/dev/null || die + + export ZSTD_SYS_USE_PKG_CONFIG=1 +} + +rust_compile() { + local DISTUTILS_USE_PEP517=maturin + local DISTUTILS_ARGS=( + # default features include requiring nightly Rust + # full include fast_alloc which requires jemalloc which requires + # git submodule dance + --no-default-features + --features=full_functionality + ) + + # TODO: other variants? + pushd runtime/polars-runtime-32 >/dev/null || die + distutils-r1_python_compile + popd || die +} + +python_compile() { + rust_compile + distutils-r1_python_compile +} + +python_test() { + local EPYTEST_IGNORE=( + # altair + tests/unit/operations/namespaces/test_plot.py + # deltalake + tests/unit/io/test_delta.py + tests/unit/io/test_delta_deletion_vector.py + # iceberg + tests/unit/io/test_iceberg.py + # jax + tests/unit/ml/test_to_jax.py + # lance + tests/unit/io/test_lance.py + # torch + tests/unit/ml/test_torch.py + # polars_ds + tests/unit/interop/test_ds_plugin.py + ) + local EPYTEST_DESELECT=( + # TODO + 'tests/docs/test_user_guide.py::test_run_python_snippets[path15]' + 'tests/unit/operations/map/test_inefficient_map_warning.py::test_parse_apply_functions[b-lambda x: str(x).title()-pl.col("b").cast(pl.String).str.to_titlecase()-None]' + "tests/unit/operations/map/test_inefficient_map_warning.py::test_parse_apply_functions[b-lambda x: x.lower() + \":\" + x.upper() + \":\" + x.title()-(((pl.col(\"b\").str.to_lowercase() + ':') + pl.col(\"b\").str.to_uppercase()) + ':') + pl.col(\"b\").str.to_titlecase()-None]" + tests/unit/operations/namespaces/string/test_string.py::test_titlecase + tests/unit/sql/test_strings.py::test_string_case + tests/unit/utils/test_utils.py::test_in_notebook + # numba + 'tests/docs/test_user_guide.py::test_run_python_snippets[path17]' + # great_tables + 'tests/docs/test_user_guide.py::test_run_python_snippets[path39]' + # pytest.raises() on warnings + tests/unit/expr/test_exprs.py::test_validate_format_argument_raises_chrono_format_warning + tests/unit/lazyframe/test_lazyframe.py::test_lazyframe_membership_operator + tests/unit/lazyframe/test_show_graph.py::test_show_graph_plan_stage_default_changed + tests/unit/meta/test_api.py::test_namespace_warning_on_override + # azure + 'tests/unit/io/cloud/test_credential_provider.py::test_credential_provider_rebuild_clears_cache[CredentialProviderAzure-abfss://container@storage_account.dfs.core.windows.net/bucket-initial_credentials1-updated_credentials1]' + # Internet + tests/unit/io/cloud/test_credential_provider.py::test_credential_provider_serialization_custom_provider + tests/unit/io/test_csv.py::test_read_web_file + # connectorx + 'tests/unit/io/database/test_read.py::test_read_database[uri: connectorx]' + tests/unit/io/database/test_read.py::test_read_database_cx_credentials + # adbc_driver_sqlite + 'tests/unit/io/database/test_read.py::test_read_database[conn: adbc (batched)]' + 'tests/unit/io/database/test_read.py::test_read_database[conn: adbc (fetchall)]' + 'tests/unit/io/database/test_read.py::test_read_database[uri: adbc]' + 'tests/unit/io/database/test_read.py::test_read_database_iter_batches[conn: adbc (ignore batch_size)]' + 'tests/unit/io/database/test_read.py::test_read_database_iter_batches[conn: adbc]' + 'tests/unit/io/database/test_read.py::test_read_database_mocked[adbc_driver_postgresql-75000-False-fetch_arrow]' + 'tests/unit/io/database/test_read.py::test_read_database_mocked[adbc_driver_postgresql-75000-True-fetch_record_batch]' + 'tests/unit/io/database/test_read.py::test_read_database_mocked[adbc_driver_postgresql-None-False-fetch_arrow]' + 'tests/unit/io/database/test_read.py::test_read_database_parameterised_adbc[?-param_value2]' + 'tests/unit/io/database/test_read.py::test_read_database_parameterised_adbc[?-param_value3]' + 'tests/unit/io/database/test_read.py::test_read_database_parameterised_adbc[?-param_value4]' + 'tests/unit/io/database/test_read.py::test_read_database_parameterised_adbc[?-param_value5]' + 'tests/unit/io/database/test_read.py::test_read_database_parameterised_adbc[?-param_value6]' + 'tests/unit/io/database/test_read.py::test_read_database_parameterised_multiple_adbc[params1-param_value1]' + 'tests/unit/io/database/test_read.py::test_read_database_parameterised_multiple_adbc[params2-param_value2]' + 'tests/unit/io/database/test_read.py::test_read_database_parameterised_multiple_adbc[params3-param_value3]' + 'tests/unit/io/database/test_read.py::test_read_database_parameterised_multiple_adbc[params4-param_value4]' + 'tests/unit/io/database/test_read.py::test_read_database_parameterised_multiple_adbc[params5-param_value5]' + 'tests/unit/io/database/test_read.py::test_read_database_uri_parameterised[?-param_value2]' + 'tests/unit/io/database/test_read.py::test_read_database_uri_parameterised[?-param_value3]' + 'tests/unit/io/database/test_read.py::test_read_database_uri_parameterised[?-param_value4]' + 'tests/unit/io/database/test_read.py::test_read_database_uri_parameterised[?-param_value5]' + 'tests/unit/io/database/test_read.py::test_read_database_uri_parameterised[?-param_value6]' + 'tests/unit/io/database/test_read.py::test_read_database_uri_parameterised_multiple[params1-param_value1]' + 'tests/unit/io/database/test_read.py::test_read_database_uri_parameterised_multiple[params2-param_value2]' + 'tests/unit/io/database/test_read.py::test_read_database_uri_parameterised_multiple[params3-param_value3]' + 'tests/unit/io/database/test_read.py::test_read_database_uri_parameterised_multiple[params4-param_value4]' + 'tests/unit/io/database/test_read.py::test_read_database_uri_parameterised_multiple[params5-param_value5]' + 'tests/unit/io/database/test_write.py::TestWriteDatabase::test_write_database_append_replace[adbc-False]' + 'tests/unit/io/database/test_write.py::TestWriteDatabase::test_write_database_append_replace[adbc-True]' + 'tests/unit/io/database/test_write.py::TestWriteDatabase::test_write_database_create[adbc-False]' + 'tests/unit/io/database/test_write.py::TestWriteDatabase::test_write_database_create[adbc-True]' + 'tests/unit/io/database/test_write.py::TestWriteDatabase::test_write_database_create_quoted_tablename[adbc-False]' + 'tests/unit/io/database/test_write.py::TestWriteDatabase::test_write_database_create_quoted_tablename[adbc-True]' + 'tests/unit/io/database/test_write.py::TestWriteDatabase::test_write_database_errors[adbc-False]' + 'tests/unit/io/database/test_write.py::TestWriteDatabase::test_write_database_errors[adbc-True]' + tests/unit/io/database/test_write.py::test_write_database_adbc_temporary_table + # deltalake + tests/unit/io/test_hive.py::test_hive_decode_reserved_ascii_23241 + tests/unit/io/test_hive.py::test_hive_decode_utf8_23241 + # gevent + tests/unit/lazyframe/test_async.py::test_gevent_collect_async_no_switch + tests/unit/lazyframe/test_async.py::test_gevent_collect_async_spawn + tests/unit/lazyframe/test_async.py::test_gevent_collect_async_switch + tests/unit/lazyframe/test_async.py::test_gevent_collect_async_with_hub + tests/unit/lazyframe/test_async.py::test_gevent_collect_async_without_hub + # require feature 'nightly', i.e. nightly Rust compiler + tests/unit/datatypes/test_map.py::test_map_null_row_strict_cast_reaches_a_nested_map + tests/unit/sql/test_numeric.py::test_erf_erfc + tests/unit/expr/test_exprs.py::test_erf_erfc + 'tests/unit/operations/map/test_inefficient_map_warning.py::test_parse_apply_functions[e-lambda x: math.erf(x)-pl.col("e").erf()-None]' + 'tests/unit/operations/map/test_inefficient_map_warning.py::test_parse_apply_functions[e-lambda x: math.erfc(x)-pl.col("e").erfc()-None]' + ) + + epytest -o addopts= -m "not benchmark" +} |
