-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[py] Remove precompiled binaries from sdist #14233
Conversation
Python sdist's should not contain precompiled architecture binaries that are architecture specific. They should contain the sources needed to build the binaries instead.
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨No code suggestions found for PR. |
How would we distribute the Selenium Manager binaries? Note that our build tool is Bazel. |
The wheel build still uses the Selenium Manager binaries. The sdist is not supposed to have architecture specific precompiled binaries AFAIU. |
Hmm, tests apparently failing for |
I think this is a flaky test. I am not concerned |
Python sdist's should not contain precompiled architecture binaries that are architecture specific. They should contain the sources needed to build the binaries instead.
User description
Python sdist's should not contain precompiled binaries that are architecture specific. They should contain the sources needed to build the binaries instead.
Description
This removes the precompiled binaries from the sdist and modifies the setuptools
setup.py
to build them with setuptools-rust from source.For example in buildroot trying to compile selenium from the sdist for an arm target gives this error:
Motivation and Context
When building python selenium from source we should not use any prebuilt binaries as they will often not be able to run on the target architecture. This is especially problematic when cross compiling.
Types of changes
Checklist
PR Type
Bug fix, Enhancement
Description
_get_binary
function inselenium_manager.py
to use the compiled path forselenium-manager
if it exists.setuptools-rust
insetup.py
to handle Rust extensions.pyproject.toml
to define build system requirements for Rust integration.rust/BUILD.bazel
.Changes walkthrough 📝
selenium_manager.py
Enhance `_get_binary` to use compiled path for `selenium-manager`
py/selenium/webdriver/common/selenium_manager.py
selenium-manager
.sysconfig
to get the executable suffix._get_binary
function to use the compiled path if it exists.setup.py
Integrate `setuptools-rust` for building Rust extensions
py/setup.py
setuptools-rust
to handle Rust extensions.rust_extensions
insetup
configuration.BUILD.bazel
Update Bazel build to include Rust sources and exclude binaries
py/BUILD.bazel
pyproject.toml
in package sources.BUILD.bazel
Add file groups for Rust source files in Bazel build
rust/BUILD.bazel
pyproject.toml
Define build system requirements for Rust integration
py/pyproject.toml
setuptools
andsetuptools-rust
.build-backend
assetuptools.build_meta
.