Skip to content

Commit 1eac865

Browse files
committed
[py] Fix license in package metadata and include copyright notices
1 parent 7407515 commit 1eac865

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ py/docs/source/**/*
7979
!py/docs/source/*.rst
8080
py/build/
8181
py/LICENSE
82+
py/NOTICE
8283
py/pytestdebug.log
8384
py/python.iml
8485
selenium.egg-info/

py/BUILD.bazel

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,24 @@ copy_file(
196196
out = "selenium-%s.dist-info/LICENSE" % SE_VERSION,
197197
)
198198

199+
select_file(
200+
name = "global-notice",
201+
srcs = "//:notice",
202+
subpath = "NOTICE",
203+
)
204+
205+
copy_file(
206+
name = "notice",
207+
src = ":global-notice",
208+
out = "NOTICE",
209+
)
210+
211+
copy_file(
212+
name = "notice-wheel",
213+
src = ":global-notice",
214+
out = "selenium-%s.dist-info/NOTICE" % SE_VERSION,
215+
)
216+
199217
py_library(
200218
name = "selenium",
201219
srcs = glob(
@@ -251,6 +269,7 @@ pkg_files(
251269
"README.rst",
252270
"pyproject.toml",
253271
":license",
272+
":notice",
254273
":selenium-pkg",
255274
":selenium-pkginfo",
256275
"//rust:selenium_manager_srcs",
@@ -304,7 +323,7 @@ py_wheel(
304323
description_file = "README.rst",
305324
distribution = "selenium",
306325
homepage = "https://www.selenium.dev",
307-
license = "Apache 2.0",
326+
license = "Apache-2.0",
308327
python_requires = ">=3.9",
309328
python_tag = "py3",
310329
requires = [
@@ -326,6 +345,7 @@ py_wheel(
326345
visibility = ["//visibility:public"],
327346
deps = [
328347
":license-wheel",
348+
":notice-wheel",
329349
":selenium-pkg",
330350
],
331351
)

py/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "selenium"
77
version = "4.35.0.202507081456"
8-
license = { text = "Apache 2.0" }
8+
license = "Apache-2.0"
9+
license-files = ["LICENSE"]
910
description = "Official Python bindings for Selenium WebDriver."
1011
readme = "README.rst"
1112
requires-python = "~=3.9"
@@ -68,6 +69,7 @@ binding = "Exec"
6869
"selenium-manager.exe",
6970
"CHANGES",
7071
"LICENSE"
72+
"NOTICE"
7173
]
7274

7375
[tool.pytest.ini_options]

0 commit comments

Comments
 (0)