diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-11-02 03:04:24 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-11-02 03:04:24 +0000 |
commit | 37a097af13d675b83911ac006ee9ee22d2163f9a (patch) | |
tree | 75294129093c3332ea0ba918643a3485b19550f6 /dev-python/selenium | |
parent | aac5e1b02ac846f5e1ce85f4f66fdec46aa9b0d1 (diff) |
gentoo auto-resync : 02:11:2024 - 03:04:23
Diffstat (limited to 'dev-python/selenium')
-rw-r--r-- | dev-python/selenium/Manifest | 3 | ||||
-rw-r--r-- | dev-python/selenium/selenium-4.26.1.ebuild | 135 |
2 files changed, 138 insertions, 0 deletions
diff --git a/dev-python/selenium/Manifest b/dev-python/selenium/Manifest index 1862a5d506a4..66a7c7574c1b 100644 --- a/dev-python/selenium/Manifest +++ b/dev-python/selenium/Manifest @@ -1,7 +1,10 @@ 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-4.26.1.tar.gz 967543 BLAKE2B 7e7476338a030083261199b725aaa38d03bb62f71c56c16495600428e976067b456c32b98d18a0fa4fcdcd6544ddb0043a8104b3c6c075917924ebb8466aee56 SHA512 08d75ee4b3b5d93ad5385c0755d1b9b4e604e491127da19ba3531c6de2213c6cbbdb768893168112643e6272019d4d761873039f42af1c96dffc7ccfb9fc3bab 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 +DIST selenium-selenium-4.26.1-python.gh.tar.gz 77109265 BLAKE2B c0c5693c64fa65a627e5edf0cbbc051410fcddf59e4fd80c362b9a382c586fc3ad3d574674e5523ab284b40b6639e95e85fd1c8195f2f1a6f35ad6532ed667ce SHA512 7ace69332f17c6f7e28b81223f4c8c62cde1832b5acaf2fd1c777a08a5a9cfebb5d9c83daa10462eeb3acb9c7cb5038711f5acee51f5dad3910d7e29e4387d3f EBUILD selenium-4.25.0.ebuild 4194 BLAKE2B b6877b705f144862ae7a23e26e86339225422cbf4fb3b5af44dc9860158dda116968349ce3cff3f9b3cfa4e71a182f00a48b055a2cd9605c0b038021cabf5961 SHA512 ea12c310a886e39854b476fc04452c4c79cc2bd4e38d01f396bd4ab0eb36f0373719831830e762b2822e4672513343997bbb5854a0ffda60038abc35af37efbe EBUILD selenium-4.26.0.ebuild 4201 BLAKE2B b0ed725b0b4b250aa95d2decb5035cee2a35e7f10579b8524f1b7a05b1791b865a6d23891247ee05aac3088794b01b1c6937c6f57f0569317d751aa2d6d8ee87 SHA512 35d3ccd18f33d22336bceb9af0fe90e6011db93e17b8f40f043ab827a6cc34a150ed30d7bbb02e0ccf3f3ed1167af521cca1ef09fbec1feb6414e6f155fa0482 +EBUILD selenium-4.26.1.ebuild 4208 BLAKE2B af68de0036ab7c2e1dda0a1d0c311d3555c78fcb424ddec6e8fc03ee67fbf9366e8d695806e0758f7d658ad27dc3b6488b40700e11f0a37457351455f73aba5c SHA512 37f8073311350a6212f3d9ab3e5feb756845cc69ee73e9f28c9f9b14fc63f0cf2780bd1bd51e8786fa5d02517dc7b26da37277618d9b0f644e1cfcbad493efa7 MISC metadata.xml 383 BLAKE2B d437d1631cefdba12fe2c3ce38ddff34bf9dd2bbc777d5d3425556bda76865711c991c9e3a735130a1d55cb7c6578b083ecb473c28706a2d45563b31bdbe6d1b SHA512 c087323da996b9ad4d0bf8f00306cf044d5daab194b60af029cb1ce06bf60c660fd5959b7914e6f1103143c3e4533d293a6d3bd0ec1c95163eba09d8a19c13a1 diff --git a/dev-python/selenium/selenium-4.26.1.ebuild b/dev-python/selenium/selenium-4.26.1.ebuild new file mode 100644 index 000000000000..2a930ffc5491 --- /dev/null +++ b/dev-python/selenium/selenium-4.26.1.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}-python +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[@]}" +} |