Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fe30f15

Browse filesBrowse files
authored
Updated pip, pkginfo, setuptools, and wheel. (bazel-contrib#661)
1 parent 0f18997 commit fe30f15
Copy full SHA for fe30f15

File tree

4 files changed

+39
-8
lines changed
Filter options

4 files changed

+39
-8
lines changed

‎examples/pip_repository_annotations/WORKSPACE

Copy file name to clipboardExpand all lines: examples/pip_repository_annotations/WORKSPACE
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ http_archive(
1616
],
1717
)
1818

19+
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
20+
21+
python_register_toolchains(
22+
name = "python39",
23+
python_version = "3.9",
24+
)
25+
26+
load("@python39//:defs.bzl", "interpreter")
1927
load("@rules_python//python:pip.bzl", "package_annotation", "pip_install", "pip_parse")
2028

2129
# Here we can see an example of annotations being applied to an arbitrary
@@ -42,6 +50,7 @@ write_file(
4250
pip_parse(
4351
name = "pip_parsed",
4452
annotations = ANNOTATIONS,
53+
python_interpreter_target = interpreter,
4554
requirements_lock = "//:requirements.txt",
4655
)
4756

@@ -53,5 +62,6 @@ install_deps()
5362
pip_install(
5463
name = "pip_installed",
5564
annotations = ANNOTATIONS,
65+
python_interpreter_target = interpreter,
5666
requirements = "//:requirements.txt",
5767
)

‎examples/relative_requirements/WORKSPACE

Copy file name to clipboardExpand all lines: examples/relative_requirements/WORKSPACE
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,17 @@ local_repository(
55
path = "../..",
66
)
77

8+
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
9+
10+
python_register_toolchains(
11+
name = "python39",
12+
python_version = "3.9",
13+
)
14+
15+
load("@python39//:defs.bzl", "interpreter")
816
load("@rules_python//python:pip.bzl", "pip_install")
917

1018
pip_install(
19+
python_interpreter_target = interpreter,
1120
requirements = "//:requirements.txt",
1221
)

‎python/pip_install/repositories.bzl

Copy file name to clipboardExpand all lines: python/pip_install/repositories.bzl
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ _RULE_DEPS = [
1919
),
2020
(
2121
"pypi__pip",
22-
"https://files.pythonhosted.org/packages/47/ca/f0d790b6e18b3a6f3bd5e80c2ee4edbb5807286c21cdd0862ca933f751dd/pip-21.1.3-py3-none-any.whl",
23-
"78cb760711fedc073246543801c84dc5377affead832e103ad0211f99303a204",
22+
"https://files.pythonhosted.org/packages/4d/16/0a14ca596f30316efd412a60bdfac02a7259bf8673d4d917dc60b9a21812/pip-22.0.4-py3-none-any.whl",
23+
"c6aca0f2f081363f689f041d90dab2a07a9a07fb840284db2218117a52da800b",
2424
),
2525
(
2626
"pypi__pip_tools",
@@ -29,18 +29,18 @@ _RULE_DEPS = [
2929
),
3030
(
3131
"pypi__pkginfo",
32-
"https://files.pythonhosted.org/packages/77/83/1ef010f7c4563e218854809c0dff9548de65ebec930921dedf6ee5981f27/pkginfo-1.7.1-py2.py3-none-any.whl",
33-
"37ecd857b47e5f55949c41ed061eb51a0bee97a87c969219d144c0e023982779",
32+
"https://files.pythonhosted.org/packages/cd/00/49f59cdd2c6a52e6665fda4de671dac5614366dc827e050c55428241b929/pkginfo-1.8.2-py2.py3-none-any.whl",
33+
"c24c487c6a7f72c66e816ab1796b96ac6c3d14d49338293d2141664330b55ffc",
3434
),
3535
(
3636
"pypi__setuptools",
37-
"https://files.pythonhosted.org/packages/a2/e1/902fbc2f61ad6243cd3d57ffa195a9eb123021ec912ec5d811acf54a39f8/setuptools-57.1.0-py3-none-any.whl",
38-
"ddae4c1b9220daf1e32ba9d4e3714df6019c5b583755559be84ff8199f7e1fe3",
37+
"https://files.pythonhosted.org/packages/7c/5b/3d92b9f0f7ca1645cba48c080b54fe7d8b1033a4e5720091d1631c4266db/setuptools-60.10.0-py3-none-any.whl",
38+
"782ef48d58982ddb49920c11a0c5c9c0b02e7d7d1c2ad0aa44e1a1e133051c96",
3939
),
4040
(
4141
"pypi__wheel",
42-
"https://files.pythonhosted.org/packages/65/63/39d04c74222770ed1589c0eaba06c05891801219272420b40311cd60c880/wheel-0.36.2-py2.py3-none-any.whl",
43-
"78b5b185f0e5763c26ca1e324373aadd49182ca90e825f7853f4b2509215dc0e",
42+
"https://files.pythonhosted.org/packages/27/d6/003e593296a85fd6ed616ed962795b2f87709c3eee2bca4f6d0fe55c6d00/wheel-0.37.1-py2.py3-none-any.whl",
43+
"4bdcd7d840138086126cd09254dc6195fb4fc6f01c050a1d7236f2630db1d22a",
4444
),
4545
]
4646

‎tests/pip_repository_entry_points/WORKSPACE

Copy file name to clipboardExpand all lines: tests/pip_repository_entry_points/WORKSPACE
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,22 @@ local_repository(
55
path = "../..",
66
)
77

8+
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
9+
10+
# This toolchain is explicitly 3.10 while `rules_python` is 3.9 to act as
11+
# a regression test, ensuring 3.10 is functional
12+
python_register_toolchains(
13+
name = "python310",
14+
python_version = "3.10",
15+
)
16+
17+
load("@python310//:defs.bzl", "interpreter")
818
load("@rules_python//python:pip.bzl", "pip_install", "pip_parse")
919

1020
# For a more thorough example of `pip_parse`. See `@rules_python//examples/pip_parse`
1121
pip_parse(
1222
name = "pip_parsed",
23+
python_interpreter_target = interpreter,
1324
requirements_lock = "//:requirements.txt",
1425
)
1526

@@ -20,5 +31,6 @@ install_deps()
2031
# For a more thorough example of `pip_install`. See `@rules_python//examples/pip_install`
2132
pip_install(
2233
name = "pip_installed",
34+
python_interpreter_target = interpreter,
2335
requirements = "//:requirements.txt",
2436
)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.