diff --git a/.gitignore b/.gitignore index d526bf6e42c0f..246f2c4bdaf7d 100644 --- a/.gitignore +++ b/.gitignore @@ -78,7 +78,6 @@ py/docs/source/**/* !py/docs/source/conf.py !py/docs/source/*.rst py/build/ -py/LICENSE py/pytestdebug.log py/python.iml selenium.egg-info/ diff --git a/py/BUILD.bazel b/py/BUILD.bazel index 37ace3ea3399c..7fa877ddcb2c7 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 = "//:license", + 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/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 diff --git a/py/pyproject.toml b/py/pyproject.toml index a82fb0a8c226e..4611b38cb5f62 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", "NOTICE"] description = "Official Python bindings for Selenium WebDriver." readme = "README.rst" requires-python = "~=3.9" @@ -67,7 +68,8 @@ binding = "Exec" "selenium-manager", "selenium-manager.exe", "CHANGES", - "LICENSE" + "LICENSE", + "NOTICE", ] [tool.pytest.ini_options]