Skip to content

Commit e237ced

Browse files
[py] Add the ability to create sdist package of the python bindings
1 parent ac3b2ec commit e237ced

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

‎py/BUILD.bazel

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
2+
load("@rules_pkg//pkg:pkg.bzl", "pkg_tar")
13
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
24
load("@rules_python//python:packaging.bzl", "py_package", "py_wheel")
35
load("@dev_requirements//:requirements.bzl", "requirement")
@@ -114,6 +116,27 @@ py_package(
114116
deps = [":selenium"],
115117
)
116118

119+
pkg_files(
120+
name = "selenium-sdist-pkg",
121+
srcs = [
122+
"CHANGES",
123+
"setup.py",
124+
"MANIFEST.in",
125+
"README.rst",
126+
":selenium-pkg",
127+
],
128+
strip_prefix = strip_prefix.from_pkg(),
129+
)
130+
131+
132+
pkg_tar(
133+
name = "selenium-sdist",
134+
srcs = [":selenium-sdist-pkg"],
135+
package_file_name = "selenium-%s.tar.gz" % SE_VERSION,
136+
extension = "tar.gz",
137+
mode = "0644"
138+
)
139+
117140
py_wheel(
118141
name = "selenium-wheel",
119142
classifiers = [

‎py/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
'selenium.webdriver.remote',
6666
'selenium.webdriver.support', ],
6767
'include_package_data': True,
68-
'install_requires': ['urllib3[secure]', "trio", "trio-websocket"],
68+
'install_requires': ['urllib3[secure, socks]~=1.26', "trio~=0.17", "trio-websocket~=0.9"],
6969
'zip_safe': False
7070
}
7171

0 commit comments

Comments
 (0)