summaryrefslogtreecommitdiff
path: root/dev-python/selenium
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/selenium')
-rw-r--r--dev-python/selenium/Manifest2
-rw-r--r--dev-python/selenium/selenium-4.42.0.ebuild165
2 files changed, 167 insertions, 0 deletions
diff --git a/dev-python/selenium/Manifest b/dev-python/selenium/Manifest
index ecccee65823f..e63f9995751d 100644
--- a/dev-python/selenium/Manifest
+++ b/dev-python/selenium/Manifest
@@ -1,6 +1,8 @@
DIST selenium-4.34.2.tar.gz 896309 BLAKE2B 094d3596a86e1cd50a6967a65b3e7b9a73300403f5d88163ded8b1d3a62cb09d77057e9b90a35b39f3a6000a8ba604bd71ecb051866cf7ad88c5ab9e21752978 SHA512 f5911f41bc4988e1af26812299cf37aba7e88820cf4e719e0e04a36a5dbdba5420422c52393c8d31c4e0f88efe779e9beec2c490892e4546caa0a920047e01fa
DIST selenium-4.35.0.tar.gz 907991 BLAKE2B e2d0baade499b41cdb23bdbae0059163fb58157dc86c3bcf4d7b9c4d040bcec19aba4000a223a4e7dd0137d4cc321064e95cd12fe22beaa311237c18261518ce SHA512 09f9149b94974c7965d5b81ee1ca65cca7e7a1de775d7323335c21acbbdc21da17f0f6314a8162177c6a22fdbb23b4147c213b2c3a98bfd9a13ac077dc113812
DIST selenium-4.41.0.tar.gz 937872 BLAKE2B fd176e710970da5435b2d2daad90ad1f6a567dd77d9cfe0cb6980612155a5194c6c80ba7be444e8baade758a91dc2f9cdc6d3ce8fffcd8c31a03271e5f7dbc2c SHA512 517e38b38266e92b66bf072640777e037d1af4321a0399d665a0f2acdb76c574abf65f8e6412e7c606a4937010ffd6bff9c9f323b51c88e80d883b5c909c2de6
+DIST selenium-4.42.0.tar.gz 956304 BLAKE2B f43bf9893135bc8b7bf739bccd4155db7200e1262abe0fdd311041066e1f37b7f090da64a17aa693e616bf27adc5e1897c2981356b6af4acb985b929e939be66 SHA512 36a17bd89f5ef03d5b72c981ba4b4e6b3c1173d3e211a9df8cd8fe77c48d99d6471f629dbaf9a2c476a446677b24574e1a37ce2370a4280ae0eb82003d0381ec
DIST selenium-selenium-4.34.2-python.gh.tar.gz 52515190 BLAKE2B 319a7083d5942c1962b4f48f907fea12943a403e4490f74f3cd38662f1c63f57270b27b6039a5a8f29a980540cd0dcf1d1c7560c7ac126f07e491983dc0e81ef SHA512 5ca0b6e970ded3dc93cd55a2c1af7c43063d87f57f119a011313eb7d08faa4057896a56d4eac2e13d39857c94b54f04840a053153cc39008c76cbdd33c8ddbba
DIST selenium-selenium-4.35.0.gh.tar.gz 52550104 BLAKE2B b7ed0fb513cfb2ed24aa8393497b349f930739c3d24a330e5942fbaa5505f31d7086396a430776a3a28a5f65927b92bf27c0a32e8c36d893b5d62ef73151d5ef SHA512 dc73829e3b0fcb7fb7ee1cc04574b95b63d23f67974575dbd66338e14a5cb2b06f983145ce874be0d7124e8828b0a41b99c75d3befb19e04cbf8d027d0bb983a
DIST selenium-selenium-4.41.0.gh.tar.gz 43597635 BLAKE2B fb24f27bf3b64d4da4a117bbb62566b6c1dd6fa85357b9db4a81f17fb5167ca1f2265a0ad8b54efeb14568477390521f5b5774e3278091fd1a0110e5e0d9ce30 SHA512 68cf0ead725d09dcaa8bfe9f239e0f8c0ca7b9dde9d11b8c22dbe53c51611534136f910bc91c9ab237e2b9c106ae06efbe0e0fa9277ef668c4a4935f74613a6c
+DIST selenium-selenium-4.42.0.gh.tar.gz 43696997 BLAKE2B 9836b8935586e21d487660f2031c316f9afd6d382a2c2e5f090fe40792215334da90c5d59b7debd612c8bb2146a3595624a5c9e949f84a4d551ec540c59b10e4 SHA512 89309fcadcbc7fdc110aa2a4c58e0f92f3872ff1addacc65813731aaca6ef48869346f69344731926dab84ecdd5a4a53a6968f7c2e953faa3cc4833ff9e511ff
diff --git a/dev-python/selenium/selenium-4.42.0.ebuild b/dev-python/selenium/selenium-4.42.0.ebuild
new file mode 100644
index 000000000000..d44762270fc1
--- /dev/null
+++ b/dev-python/selenium/selenium-4.42.0.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_TESTED=( python3_{11..14} pypy3_11 )
+PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
+
+inherit distutils-r1 pypi
+
+# base releases are usually ${P}, followups ${P}-python
+TEST_TAG=${P}
+[[ ${PV} != *.0 ]] && TEST_TAG+=-python
+TEST_P=selenium-${TEST_TAG}
+
+DESCRIPTION="Python language binding for Selenium Remote Control"
+HOMEPAGE="
+ https://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 ~x86"
+IUSE="test test-rust"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/certifi-2026.1.4[${PYTHON_USEDEP}]
+ >=dev-python/trio-0.31.0[${PYTHON_USEDEP}]
+ >=dev-python/trio-websocket-0.12.2[${PYTHON_USEDEP}]
+ >=dev-python/typing-extensions-4.15.0[${PYTHON_USEDEP}]
+ >=dev-python/urllib3-2.6.0[${PYTHON_USEDEP}]
+ >=dev-python/websocket-client-1.8.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ $(python_gen_cond_dep "
+ dev-python/filetype[\${PYTHON_USEDEP}]
+ dev-python/pytest-mock[\${PYTHON_USEDEP}]
+ dev-python/rich[\${PYTHON_USEDEP}]
+ test-rust? (
+ dev-python/pytest[\${PYTHON_USEDEP}]
+ dev-python/pytest-rerunfailures[\${PYTHON_USEDEP}]
+ >=dev-util/selenium-manager-${PV}
+ net-misc/geckodriver
+ || (
+ www-client/firefox
+ www-client/firefox-bin
+ )
+ )
+ " "${PYTHON_TESTED[@]}")
+ )
+"
+
+src_prepare() {
+ distutils-r1_src_prepare
+
+ # do not build selenium-manager implicitly
+ sed -e 's:\[tool\.setuptools-rust:[tool.ignore-me:' \
+ -i pyproject.toml || die
+ # unpin deps
+ sed -i -e 's:,<[0-9.]*::' pyproject.toml || die
+ # remove nonsense typing deps
+ sed -i -e '/types/d' -e '/typing/d' pyproject.toml || die
+}
+
+python_test() {
+ # NB: xdist is causing random pytest crashes with high job numbers
+
+ if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
+ einfo "Skipping tests on ${EPYTHON}"
+ return
+ fi
+
+ local EPYTEST_PLUGINS=( pytest-mock )
+ local EPYTEST_IGNORE=()
+ 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"
+ )
+ if use test-rust; then
+ local -x PATH=${T}/bin:${PATH}
+ local -x SE_MANAGER_PATH="$(type -P selenium-manager)"
+
+ local EPYTEST_RERUNS=5
+ pytest_args+=(
+ --driver=firefox
+ --browser-binary="$(type -P firefox || type -P firefox-bin)"
+ --driver-binary="$(type -P geckodriver)"
+ --headless
+ )
+
+ local EPYTEST_IGNORE+=(
+ # requires some "python.runfiles", also bidi tests generally fail
+ test/selenium/webdriver/common/bidi_webextension_tests.py
+ # throws some error that pytest doesn't even show
+ test/selenium/webdriver/firefox/ff_installs_addons_tests.py
+ )
+ 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/devtools_tests.py::test_check_console_messages[firefox]'
+
+ # TODO
+ test/selenium/webdriver/common/bidi_browser_tests.py
+ test/selenium/webdriver/common/bidi_browsing_context_tests.py
+ test/selenium/webdriver/common/bidi_emulation_tests.py
+ test/selenium/webdriver/common/bidi_errors_tests.py
+ test/selenium/webdriver/common/bidi_input_tests.py
+ test/selenium/webdriver/common/bidi_integration_tests.py
+ test/selenium/webdriver/common/bidi_log_tests.py
+ test/selenium/webdriver/common/bidi_network_tests.py
+ test/selenium/webdriver/common/bidi_permissions_tests.py
+ test/selenium/webdriver/common/bidi_script_tests.py
+ test/selenium/webdriver/common/bidi_session_tests.py
+ test/selenium/webdriver/common/bidi_storage_tests.py
+ test/selenium/webdriver/common/bidi_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
+ test/selenium/webdriver/remote/remote_custom_locator_tests.py::test_find_element_with_custom_locator
+ test/selenium/webdriver/remote/remote_custom_locator_tests.py::test_find_elements_with_custom_locator
+
+ # Internet
+ test/selenium/webdriver/remote/remote_server_tests.py::test_download_latest_server
+ test/selenium/webdriver/remote/remote_hub_connection_tests.py::test_command_executor_ssl_certificate_is_verified
+ )
+ else
+ EPYTEST_IGNORE+=(
+ test/selenium
+ )
+ fi
+
+ cd "${WORKDIR}/${TEST_P}/py" || die
+ rm -rf selenium || die
+ epytest "${pytest_args[@]}"
+}