-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 installing most of the data from source distributions #15128
base: trunk
Are you sure you want to change the base?
Conversation
Change `namespaces` to true to fix installing `selenium.webdriver.common.devtools.*` packages, and fix `package-data` to fix installing `.js` and `.json` data files. The latter would specify a non-existing `selenium_package` package name -- instead, specify `*` to apply it to all Python packages found. With these changes, the result of installing the source distribution is almost identical to the result of installing the wheel. One remaining problem is that `selenium-manager` is not included -- my guess is that there is no logic copying the built Rust executable into the expected location. Another problem is that these changes do not work when installing from a VCS checkout -- since all the relevant data files are explicitly excluded by `.gitignore` and that takes precedence over `data-files`. However, this was broken before, so it should not really matter. Fixes SeleniumHQ#15125
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
That linter seems to not "see" the whole file? |
This is source dist is built from this PR https://test.pypi.org/project/selenium/4.29.0.202501211759/#files |
Yep, I can confirm it looks good (modulo what was said above): ----
Name
-selenium-4.28.0.dist-info/LICENSE
-selenium-4.28.0.dist-info/METADATA
-selenium-4.28.0.dist-info/RECORD
-selenium-4.28.0.dist-info/WHEEL
+selenium-4.29.0.202501211759.dist-info/LICENSE
+selenium-4.29.0.202501211759.dist-info/METADATA
+selenium-4.29.0.202501211759.dist-info/RECORD
+selenium-4.29.0.202501211759.dist-info/top_level.txt
+selenium-4.29.0.202501211759.dist-info/WHEEL
selenium/common/exceptions.py
selenium/common/__init__.py
selenium/__init__.py
@@ -265,9 +266,7 @@ selenium/webdriver/common/fedcm/dialog.p
selenium/webdriver/common/fedcm/__init__.py
selenium/webdriver/common/__init__.py
selenium/webdriver/common/keys.py
-selenium/webdriver/common/linux/selenium-manager
selenium/webdriver/common/log.py
-selenium/webdriver/common/macos/selenium-manager
selenium/webdriver/common/mutation-listener.js
selenium/webdriver/common/options.py
selenium/webdriver/common/print_page_options.py
@@ -278,7 +277,6 @@ selenium/webdriver/common/timeouts.py
selenium/webdriver/common/utils.py
selenium/webdriver/common/virtual_authenticator.py
selenium/webdriver/common/window.py
-selenium/webdriver/common/windows/selenium-manager.exe
selenium/webdriver/edge/__init__.py
selenium/webdriver/edge/options.py
selenium/webdriver/edge/remote_connection.py |
Signed-off-by: Viet Nguyen Duc <[email protected]>
@diemol, the fix is verified and ready for patch 4.28.1 |
User description
Description
Change
namespaces
to true to fix installingselenium.webdriver.common.devtools.*
packages, and fixpackage-data
to fix installing.js
and.json
data files. The latter would specify a non-existingselenium_package
package name -- instead, specify*
to apply it to all Python packages found.With these changes, the result of installing the source distribution is almost identical to the result of installing the wheel. One remaining problem is that
selenium-manager
is not included -- my guess is that there is no logic copying the built Rust executable into the expected location.Another problem is that these changes do not work when installing from a VCS checkout -- since all the relevant data files are explicitly excluded by
.gitignore
and that takes precedence overdata-files
. However, this was broken before, so it should not really matter.Motivation and Context
Fixes #15125 -- install from source distribution resulting in missing data files
Types of changes
Checklist
PR Type
Bug fix
Description
Enabled
namespaces
to fix package installation issues.Updated
package-data
to include.js
and.json
files.Resolved discrepancies between source distribution and wheel installation.
Addressed missing data files during source distribution installation.
Changes walkthrough 📝
pyproject.toml
Fix package and data file installation issues
py/pyproject.toml
namespaces
totrue
to fix package installation.package-data
to apply to all Python packages..py
,.rst
,.json
, and.xpi
files.