-
- Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Fix selenium-manager binary location #16074
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] Fix selenium-manager binary location #16074
Conversation
This build was incorrectly migrated in SeleniumHQ#14837 as selenium-manager is expected to be in the selenium/webdriver/common library path rather than a binary named selenium.webdriver.common.selenium-manager installed in the script path.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
This suggestion is wrong, the binary does not have an underscore in its name. |
Can you explain what this fixes? We are distributing a binary executable, not a library that can be imported by Python... so the current code using |
It fixes the binary executable name/path.
Yes, I'm aware that we're distributing a binary executable, however the python code that wraps it expects it to be in a specific location and have a specific name. Using The Using |
Is this change for building Selenium Manager binaries from an sdist using Python tooling? Currently, we build a wheel using Bazel and the selenium-manager binaries are named and located exactly where the binding code expects them to be. |
Yes, this is only for sdist builds.
Essentially this change should make builds using the Python setuptools-rust tooling install the selenium-manager binary to the same location as Bazel does for wheels. |
OK.. I understand now. Thanks, this seems useful. |
I just tested this locally and was able to build/install. This is a huge improvement for doing local Python development. Previously you needed to have bazel installed, build selenium manager, copy the binary into your source tree, and adjust your Python path... or build the wheel with bazel after every change. Now you can just use standard Python tooling and do Ininitally I was getting an error because it couldn't find
Is there a better way to specify |
This path doesn't look valid for building from a sdist.
Um....I think you still have to use bazel to build the sdist(which will copy Cargo.toml to the sdist root), then you can pip install from the generated sdist. |
Right. I was building from local source, not an sdist, and it needed that path. Will having that path specified break building from an sdist? (I guess I can test this).
I was able to build directly from my local source repo without using bazel at all. |
Pretty sure it will as we can't go above the sdist root path.
But isn't it missing stuff like devtools which bazel needs to generate? |
yea, that's right.. so I guess it wouldn't be viable for local development without bazel. Too bad :/ This PR is still a big improvement since it allows us to build a useable sdist with bazel. I guess the current sdist we publish to PyPI is broken? |
Yeah, seems like it. |
Well I suppose you could just develop from the generated sdist tree and copy changes back manually. |
I just tested this locally... I installed I then built an sdist from this PR's branch ( So, LGTM 👍 thanks. |
User description
This build was incorrectly migrated in #14837 as selenium-manager is expected to be in the
selenium/webdriver/common/selenium-manager
library path rather than a binary namedselenium.webdriver.common.selenium-manager
installed in the script path.🔗 Related Issues
Fixes #14837.
💥 What does this PR do?
Fixes sdist
selenium-manager
binary name/path.🔄 Types of changes
PR Type
Bug fix
Description
Fix selenium-manager binary location in Python package
Change from bins to ext-modules configuration
Correct path for selenium-manager in library structure
Diagram Walkthrough
File Walkthrough
pyproject.toml
Fix selenium-manager build configuration
py/pyproject.toml
[[tool.setuptools-rust.bins]]
to[[tool.setuptools-rust.ext-modules]]
binding = "Exec"
configuration