commit: 160c1e8fa636d7853223e3789b074a010887c4b3 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Thu Oct 31 05:17:45 2024 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Thu Oct 31 05:22:05 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=160c1e8f
dev-python/selenium: Bump to 4.26.0 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/selenium/Manifest | 2 + dev-python/selenium/selenium-4.26.0.ebuild | 135 +++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) diff --git a/dev-python/selenium/Manifest b/dev-python/selenium/Manifest index fa8fe427ebd9..08a714495cb4 100644 --- a/dev-python/selenium/Manifest +++ b/dev-python/selenium/Manifest @@ -1,6 +1,8 @@ DIST selenium-4.23.1.tar.gz 945830 BLAKE2B 7931156bc8b79484433cb6a9bd7d49852981e3662a8e75f1f48d683644bac1c78e616e33965c611f50203a6a6f0f5bd09501c16816afe7a7c27b2a9e72a10a14 SHA512 3f9cda92c606ce7a32ecb6f1ef434501368fdab8673a0f23a39d78b80e80b732fafb6e29842ab5301d31cd8eaa907561b91a96cf67e181daeae3378e6a0e9a5b DIST selenium-4.24.0.tar.gz 952221 BLAKE2B b3336b41219884625885b3066a17ad5a45da9c28635ae20f7635fdedd0cda3a61f19f71ce151dc7bb1ed7338927eedc8492011871b225296bc57b21084d64855 SHA512 77508e4200e399a7b7c5c03d91d9c8fde97f733c4611bd98385bde1623ab2df91cc52168a8ff19a0ac99da95e2b96321d4d1cefecce2af30f3f0b54d90b9b2a5 DIST selenium-4.25.0.tar.gz 957765 BLAKE2B e62f1e9e0619f376e75cbfdbc67540184dde32b5e3bfe07a80157a49bdbfe5475f7ea02bd4b130b24e83c82fc838c2b22d3bf09fd9bd76f4bb475e690f979346 SHA512 6961356a1e03d5b76f07fbf3e3bc834915c52b9c744aeebbde2a9a3c89c661b07f798629770a45e6842b509ae10cbeac61aa92101978bd334e9d1444dd743735 +DIST selenium-4.26.0.tar.gz 967159 BLAKE2B 211a82d59813884cd4be133726b2ae70c530bb8676c505d44ae25e8b8e5bc38fd7e35839fe042a85fb3dd93c1c87ecd7d6c81cb1a1d7811b4b9f6f1811328c21 SHA512 8864c7d49591e29ee82c66c4548ca7286d0770efecf5b15e41c3622f541a665a404958afdc22b872f191487349602da13a3db7cd32aa14155c09d21a8a3e7b92 DIST selenium-selenium-4.23.1-python.gh.tar.gz 77116002 BLAKE2B dad444b109d2494b3442c81187fa6c9d3db2565183304f76d2badf2444e0545727c6f4bf08be0a5102692b9c018b3354a4063758253275624f9f4d6ff6d49254 SHA512 e7d4dc8f14fe9cae3d8e362a03b5068536d64e8484e151187ae9c917350e1f299977fb1521066998fba5cd845c5167a8440d02b15547d066a40d3e79cac1f50d DIST selenium-selenium-4.24.0.gh.tar.gz 77126013 BLAKE2B a909714b93b0cfc92a9d70d8cf20609eec65ebce3470fe487a23c86ac4f6f3dbf2e2ef88e00883999fe8b5e2842a05039fec94f6617961c436649baa618c59f8 SHA512 bc6f8066efba5a4f5a27abcc37eefa303e9efd89423729fedb4f466d98ed57e68c8593248206e4fc13cebd3446fa25a5a856d5f4c1d05940d73cecc920b4c522 DIST selenium-selenium-4.25.0.gh.tar.gz 77158053 BLAKE2B 9978239a874d32e23d98ec98eb5292153496c42abcdd0f959875b2b460df5a85c0b532b6843e0d13b931078490958ebdc2944a8c21ce2eae24a0ac6a3c830772 SHA512 6d11d1aa22d27dbc07c3d39f5f852080c5089b12b1da0251e7b09c38ac3b8f56f452a24c64a20685eb0aff238698ab4bd18a8b7089c69f261cfbcdc679ceeac8 +DIST selenium-selenium-4.26.0.gh.tar.gz 77107740 BLAKE2B d4e466dbdb9a12126ae8ee9e311d5d997228da3b22620ead3dbf1a553232503fbd8c19470419d6ad5862acfc19f0012c4c48b3a5e1ccecaf0f7c4171f35904fb SHA512 03197215c04e8f6e151631d769975e70b5140d2d7635443c07e43e63b1c0cc3bc99b0694300ca4dbfea6178af9d037d28699a756ef74926a357f7a3030086182 diff --git a/dev-python/selenium/selenium-4.26.0.ebuild b/dev-python/selenium/selenium-4.26.0.ebuild new file mode 100644 index 000000000000..546d13f5cd0c --- /dev/null +++ b/dev-python/selenium/selenium-4.26.0.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_TESTED=( python3_{10..12} pypy3 ) +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_13 ) + +inherit distutils-r1 pypi + +# upstream sometimes tags it as ${P}, sometimes as ${P}-python, sigh +TEST_TAG=${P} +TEST_P=selenium-${TEST_TAG} + +DESCRIPTION="Python language binding for Selenium Remote Control" +HOMEPAGE=" + https://www.seleniumhq.org/ + https://github.com/SeleniumHQ/selenium/tree/trunk/py/ + https://pypi.org/project/selenium/ +" +SRC_URI+=" + test? ( + https://github.com/SeleniumHQ/selenium/archive/${TEST_TAG}.tar.gz + -> ${TEST_P}.gh.tar.gz + ) +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="test-rust" + +RDEPEND=" + >=dev-python/certifi-2021.10.8[${PYTHON_USEDEP}] + <dev-python/trio-1[${PYTHON_USEDEP}] + >=dev-python/trio-0.17[${PYTHON_USEDEP}] + <dev-python/trio-websocket-1[${PYTHON_USEDEP}] + >=dev-python/trio-websocket-0.9[${PYTHON_USEDEP}] + <dev-python/typing-extensions-5[${PYTHON_USEDEP}] + >=dev-python/typing-extensions-4.9[${PYTHON_USEDEP}] + <dev-python/urllib3-3[${PYTHON_USEDEP}] + >=dev-python/urllib3-1.26[${PYTHON_USEDEP}] + <dev-python/websocket-client-2[${PYTHON_USEDEP}] + >=dev-python/websocket-client-1.8.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/pytest-mock[${PYTHON_USEDEP}] + test-rust? ( + dev-python/pytest-rerunfailures[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + dev-util/selenium-manager + net-misc/geckodriver + || ( + www-client/firefox + www-client/firefox-bin + ) + ) + ) +" + +distutils_enable_tests pytest + +src_prepare() { + distutils-r1_src_prepare + + # do not build selenium-manager implicitly + sed -e '/setuptools_rust/d' \ + -e '/rust_extensions/,/\]/d' \ + -i setup.py || die +} + +python_test() { + if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then + einfo "Skipping tests on ${EPYTHON}" + return + fi + + local EPYTEST_DESELECT=( + # expects vanilla certifi + test/unit/selenium/webdriver/remote/remote_connection_tests.py::test_get_connection_manager_for_certs_and_timeout + ) + local pytest_args=( + # https://github.com/SeleniumHQ/selenium/blob/selenium-4.8.2-python/py/test/runner/run_pytest.py#L20-L24 + # seriously? + -o "python_files=*_tests.py test_*.py" + -p pytest_mock + ) + if use test-rust; then + local -x PATH=${T}/bin:${PATH} + local -x SE_MANAGER_PATH="$(type -P selenium-manager)" + + local EPYTEST_XDIST=1 + pytest_args+=( + -p rerunfailures --reruns=5 + + --driver=firefox + --browser-binary="$(type -P firefox || type -P firefox-bin)" + --driver-binary="$(type -P geckodriver)" + --headless=true + ) + + EPYTEST_DESELECT+=( + # expects prebuilt executables for various systems + test/selenium/webdriver/common/selenium_manager_tests.py::test_uses_windows + test/selenium/webdriver/common/selenium_manager_tests.py::test_uses_linux + test/selenium/webdriver/common/selenium_manager_tests.py::test_uses_mac + test/selenium/webdriver/common/selenium_manager_tests.py::test_errors_if_invalid_os + + # TODO: these don't respect --*-binary and try to fetch versions + test/selenium/webdriver/firefox + test/selenium/webdriver/marionette/mn_context_tests.py::test_context_sets_correct_context_and_returns + test/selenium/webdriver/marionette/mn_context_tests.py::test_context_sets_correct_context_and_returns + test/selenium/webdriver/marionette/mn_options_tests.py::TestIntegration::test_we_can_pass_options + test/selenium/webdriver/marionette/mn_set_context_tests.py::test_we_can_switch_context_to_chrome + + # TODO + test/selenium/webdriver/common/bidi_script_tests.py + test/selenium/webdriver/marionette/mn_options_tests.py::TestUnit::test_binary + test/selenium/webdriver/marionette/mn_options_tests.py::TestUnit::test_ctor + test/selenium/webdriver/marionette/mn_options_tests.py::TestUnit::test_prefs + test/selenium/webdriver/marionette/mn_options_tests.py::TestUnit::test_to_capabilities + ) + else + EPYTEST_DESELECT+=( + test/selenium + ) + fi + + cd "${WORKDIR}/${TEST_P}/py" || die + rm -rf selenium || die + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest "${pytest_args[@]}" +}