Skip to content

Commit 4331fe5

Browse files
committed
[py] Fix installing most of the data from source distributions
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 #15125
1 parent 10119a9 commit 4331fe5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

py/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ zip-safe = false
4040
[tool.setuptools.packages.find]
4141
include = ["selenium*"]
4242
exclude = ["test*"]
43-
namespaces = false
43+
namespaces = true
4444
# include-package-data is `true` by default in pyproject.toml
4545

4646
[[tool.setuptools-rust.bins]]
@@ -54,7 +54,7 @@ Documentation = "https://www.selenium.dev/documentation/overview/"
5454
SourceCode = "https://github.com/SeleniumHQ/selenium/tree/trunk/py"
5555

5656
[tool.setuptools.package-data]
57-
selenium_package = [
57+
"*" = [
5858
"*.py",
5959
"*.rst",
6060
"*.json",

0 commit comments

Comments
 (0)