From 1eac865c89719e60aab2cfc5a17e094508e3ce4d Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 31 Jul 2025 09:49:33 -0400 Subject: [PATCH 1/6] [py] Fix license in package metadata and include copyright notices --- .gitignore | 1 + py/BUILD.bazel | 22 +++++++++++++++++++++- py/pyproject.toml | 4 +++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d526bf6e42c0f..5ed361f3a1ab0 100644 --- a/.gitignore +++ b/.gitignore @@ -79,6 +79,7 @@ py/docs/source/**/* !py/docs/source/*.rst py/build/ py/LICENSE +py/NOTICE py/pytestdebug.log py/python.iml selenium.egg-info/ diff --git a/py/BUILD.bazel b/py/BUILD.bazel index 37ace3ea3399c..91b9c4fae67df 100644 --- a/py/BUILD.bazel +++ b/py/BUILD.bazel @@ -196,6 +196,24 @@ copy_file( out = "selenium-%s.dist-info/LICENSE" % SE_VERSION, ) +select_file( + name = "global-notice", + srcs = "//:notice", + subpath = "NOTICE", +) + +copy_file( + name = "notice", + src = ":global-notice", + out = "NOTICE", +) + +copy_file( + name = "notice-wheel", + src = ":global-notice", + out = "selenium-%s.dist-info/NOTICE" % SE_VERSION, +) + py_library( name = "selenium", srcs = glob( @@ -251,6 +269,7 @@ pkg_files( "README.rst", "pyproject.toml", ":license", + ":notice", ":selenium-pkg", ":selenium-pkginfo", "//rust:selenium_manager_srcs", @@ -304,7 +323,7 @@ py_wheel( description_file = "README.rst", distribution = "selenium", homepage = "https://www.selenium.dev", - license = "Apache 2.0", + license = "Apache-2.0", python_requires = ">=3.9", python_tag = "py3", requires = [ @@ -326,6 +345,7 @@ py_wheel( visibility = ["//visibility:public"], deps = [ ":license-wheel", + ":notice-wheel", ":selenium-pkg", ], ) diff --git a/py/pyproject.toml b/py/pyproject.toml index a82fb0a8c226e..61a3b190313b8 100644 --- a/py/pyproject.toml +++ b/py/pyproject.toml @@ -5,7 +5,8 @@ build-backend = "setuptools.build_meta" [project] name = "selenium" version = "4.35.0.202507081456" -license = { text = "Apache 2.0" } +license = "Apache-2.0" +license-files = ["LICENSE"] description = "Official Python bindings for Selenium WebDriver." readme = "README.rst" requires-python = "~=3.9" @@ -68,6 +69,7 @@ binding = "Exec" "selenium-manager.exe", "CHANGES", "LICENSE" + "NOTICE" ] [tool.pytest.ini_options] From fdcddcd2cbf25c9327a1ea787e4b403f7e2faad1 Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 31 Jul 2025 09:59:21 -0400 Subject: [PATCH 2/6] [py] Add missing commas --- py/pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/pyproject.toml b/py/pyproject.toml index 61a3b190313b8..211a50c459ed9 100644 --- a/py/pyproject.toml +++ b/py/pyproject.toml @@ -68,8 +68,8 @@ binding = "Exec" "selenium-manager", "selenium-manager.exe", "CHANGES", - "LICENSE" - "NOTICE" + "LICENSE", + "NOTICE", ] [tool.pytest.ini_options] From 163f745d3138a993e744a2338940d2321401820b Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 31 Jul 2025 10:25:41 -0400 Subject: [PATCH 3/6] [py] Fix bazel --- py/BUILD.bazel | 6 ------ 1 file changed, 6 deletions(-) diff --git a/py/BUILD.bazel b/py/BUILD.bazel index 91b9c4fae67df..2e5ab31d0442b 100644 --- a/py/BUILD.bazel +++ b/py/BUILD.bazel @@ -196,12 +196,6 @@ copy_file( out = "selenium-%s.dist-info/LICENSE" % SE_VERSION, ) -select_file( - name = "global-notice", - srcs = "//:notice", - subpath = "NOTICE", -) - copy_file( name = "notice", src = ":global-notice", From 189a0f34bcfe776298cf10514f1a4ee1dd14df16 Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 31 Jul 2025 11:49:17 -0400 Subject: [PATCH 4/6] [py] Fix Bazel --- py/BUILD.bazel | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/py/BUILD.bazel b/py/BUILD.bazel index 2e5ab31d0442b..7fa877ddcb2c7 100644 --- a/py/BUILD.bazel +++ b/py/BUILD.bazel @@ -196,6 +196,12 @@ copy_file( out = "selenium-%s.dist-info/LICENSE" % SE_VERSION, ) +select_file( + name = "global-notice", + srcs = "//:license", + subpath = "NOTICE", +) + copy_file( name = "notice", src = ":global-notice", From 44791b21c678b6cf203f85d8218af14ddc82c712 Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Thu, 31 Jul 2025 12:17:19 -0400 Subject: [PATCH 5/6] [py] Symlink LICENSE and NOTICE files --- .gitignore | 2 -- py/LICENSE | 1 + py/NOTICE | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) create mode 120000 py/LICENSE create mode 120000 py/NOTICE diff --git a/.gitignore b/.gitignore index 5ed361f3a1ab0..246f2c4bdaf7d 100644 --- a/.gitignore +++ b/.gitignore @@ -78,8 +78,6 @@ py/docs/source/**/* !py/docs/source/conf.py !py/docs/source/*.rst py/build/ -py/LICENSE -py/NOTICE py/pytestdebug.log py/python.iml selenium.egg-info/ diff --git a/py/LICENSE b/py/LICENSE new file mode 120000 index 0000000000000..ea5b60640b01f --- /dev/null +++ b/py/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/py/NOTICE b/py/NOTICE new file mode 120000 index 0000000000000..7e1b82f6e6a12 --- /dev/null +++ b/py/NOTICE @@ -0,0 +1 @@ +../NOTICE \ No newline at end of file From c61319c4ebcb95dee94cf8cbfd294544e81e24df Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Fri, 1 Aug 2025 14:22:30 -0400 Subject: [PATCH 6/6] [py] Add NOTICE to license-files array --- py/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/pyproject.toml b/py/pyproject.toml index 211a50c459ed9..4611b38cb5f62 100644 --- a/py/pyproject.toml +++ b/py/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "selenium" version = "4.35.0.202507081456" license = "Apache-2.0" -license-files = ["LICENSE"] +license-files = ["LICENSE", "NOTICE"] description = "Official Python bindings for Selenium WebDriver." readme = "README.rst" requires-python = "~=3.9"