Skip to content

Commit 2a74c64

Browse files
authored
[py] Fix license in package metadata and include copyright notices (#16114)
1 parent b981b71 commit 2a74c64

File tree

5 files changed

+27
-4
lines changed

5 files changed

+27
-4
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ py/docs/source/**/*
7878
!py/docs/source/conf.py
7979
!py/docs/source/*.rst
8080
py/build/
81-
py/LICENSE
8281
py/pytestdebug.log
8382
py/python.iml
8483
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 = "//:license",
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/LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE

py/NOTICE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../NOTICE

py/pyproject.toml

Lines changed: 4 additions & 2 deletions
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", "NOTICE"]
910
description = "Official Python bindings for Selenium WebDriver."
1011
readme = "README.rst"
1112
requires-python = "~=3.9"
@@ -67,7 +68,8 @@ binding = "Exec"
6768
"selenium-manager",
6869
"selenium-manager.exe",
6970
"CHANGES",
70-
"LICENSE"
71+
"LICENSE",
72+
"NOTICE",
7173
]
7274

7375
[tool.pytest.ini_options]

0 commit comments

Comments
 (0)