-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Support ARM binary selection for Selenium Manager #16052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
[py] Support ARM binary selection for Selenium Manager #16052
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
|
Something has been changed? Should I be aware?.. |
No, I have a script that syncs my fork's branches with the main repo.. it triggers CI every time I update. I'll see if I can fix it so I don't do so many unnecessary merges in a branch with no changes. |
|
Is creating a huge hard coded list the best way to do this? (curious how painful the other bindings will be) |
I just refactored the way it chooses the binary name and location so it's more flexible and we don't have to hard code a big list. But it still has to go through some kind of nasty conditional logic to figure out the binary name:
and the directory it's in:
|
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||||

User description
DO NOT MERGE - This PR depends on #16045 and #16046 landing first.
🔗 Related Issues
#15801
💥 What does this PR do?
Work is being done towards supporting ARM binaries for Selenium Manager (see: #15801, #16045, #16046). Once we begin publishing ARM64 binaries for Windows and Linux, the bindings will need to be updated to select the correct binary at runtime based on architecture.
This PR contains the updates to Python packaging and the Python bindings code to support this change.
💡 Additional Considerations
This PR assumes we are building/publishing new binaries named
selenium-manager-arm64(Linux) andselenium-manager-arm64.exe(Windows). It will need to be adapted to reflect whatever names are actually used when the work is done.🔄 Types of changes
PR Type
Enhancement
Description
Add ARM64 binary support for Selenium Manager
Update binary selection logic for architecture detection
Modify build configuration for ARM64 binaries
Update packaging to include ARM64 executables
Changes diagram
Changes walkthrough 📝
selenium_manager.py
ARM64 binary selection logic implementationpy/selenium/webdriver/common/selenium_manager.py
platform.machine().lower()BUILD.bazel
Build configuration for ARM64 binariespy/BUILD.bazel
manager-linux-arm64andmanager-windows-arm64targetspyproject.toml
Package data configuration for ARM64py/pyproject.toml
selenium-manager-arm64andselenium-manager-arm64.exePR Type
Enhancement
Description
Add ARM64 binary selection support for Selenium Manager
Refactor binary selection logic to detect architecture dynamically
Support ARM64 binaries on Windows and Linux platforms
Update build configuration and packaging for ARM64 executables
Diagram Walkthrough
File Walkthrough
selenium_manager.py
Implement dynamic ARM64 binary selection logicpy/selenium/webdriver/common/selenium_manager.py
detection
using
platform.machine()aarch64andarm64architecture identifiersplatform and architecture
selenium_manager_tests.py
Add ARM64 architecture tests and update assertionspy/test/selenium/webdriver/common/selenium_manager_tests.py
test_uses_windows_arm()to verify ARM64 binaryselection on Windows
test_uses_linux_arm64()to expect successful ARM64 binaryresolution instead of exception
platform.machine()mocking totest_uses_windows()forconsistency
test_errors_if_invalid_os()tomatch new error format
BUILD.bazel
Add Bazel build rules for ARM64 binariespy/BUILD.bazel
manager-linux-arm64copy rule to include ARM64 Linux binary inbuild
manager-windows-arm64copy rule to include ARM64 Windows binaryin build
//common/managerbuildtarget
pyproject.toml
Include ARM64 binaries in Python package datapy/pyproject.toml
selenium-manager-arm64to package data for Linux ARM64 binaryselenium-manager-arm64.exeto package data for Windows ARM64binary