-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Remove precompiled binaries from sdist #14233
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
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.
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.pyto 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_binaryfunction inselenium_manager.pyto use the compiled path forselenium-managerif it exists.setuptools-rustinsetup.pyto handle Rust extensions.pyproject.tomlto 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.sysconfigto get the executable suffix._get_binaryfunction to use the compiled path if it exists.setup.py
Integrate `setuptools-rust` for building Rust extensionspy/setup.py
setuptools-rustto handle Rust extensions.rust_extensionsinsetupconfiguration.BUILD.bazel
Update Bazel build to include Rust sources and exclude binariespy/BUILD.bazel
pyproject.tomlin package sources.BUILD.bazel
Add file groups for Rust source files in Bazel buildrust/BUILD.bazel
pyproject.toml
Define build system requirements for Rust integrationpy/pyproject.toml
setuptoolsandsetuptools-rust.build-backendassetuptools.build_meta.