Skip to content

Commit 6b81489

Browse files
hawkinspGoogle-ML-Automation
authored andcommitted
Update packaging and pip versions in rules_python to enable freethreading support.
The same change has been sent upstream as bazel-contrib/rules_python#2514 Forked from #20723 for merging. PiperOrigin-RevId: 708471912
1 parent 3a063ca commit 6b81489

4 files changed

Lines changed: 82 additions & 0 deletions

File tree

third_party/py/python_init_rules.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ def python_init_rules():
88
sha256 = "62ddebb766b4d6ddf1712f753dac5740bea072646f630eb9982caa09ad8a7687",
99
strip_prefix = "rules_python-0.39.0",
1010
url = "https://github.com/bazelbuild/rules_python/releases/download/0.39.0/rules_python-0.39.0.tar.gz",
11+
patch_args = ["-p1"],
12+
patches = [Label("//third_party/py:rules_python.patch")],
1113
)

third_party/py/rules_python.patch

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
diff --git a/python/private/pypi/deps.bzl b/python/private/pypi/deps.bzl
2+
index 8949ed4a..8d0ab0e7 100644
3+
--- a/python/private/pypi/deps.bzl
4+
+++ b/python/private/pypi/deps.bzl
5+
@@ -51,8 +51,8 @@ _RULE_DEPS = [
6+
),
7+
(
8+
"pypi__packaging",
9+
- "https://files.pythonhosted.org/packages/49/df/1fceb2f8900f8639e278b056416d49134fb8d84c5942ffaa01ad34782422/packaging-24.0-py3-none-any.whl",
10+
- "2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5",
11+
+ "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl",
12+
+ "09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759",
13+
),
14+
(
15+
"pypi__pep517",
16+
@@ -61,8 +61,8 @@ _RULE_DEPS = [
17+
),
18+
(
19+
"pypi__pip",
20+
- "https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl",
21+
- "ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc",
22+
+ "https://files.pythonhosted.org/packages/ef/7d/500c9ad20238fcfcb4cb9243eede163594d7020ce87bd9610c9e02771876/pip-24.3.1-py3-none-any.whl",
23+
+ "3790624780082365f47549d032f3770eeb2b1e8bd1f7b2e02dace1afa361b4ed",
24+
),
25+
(
26+
"pypi__pip_tools",
27+
diff --git a/python/private/pypi/evaluate_markers.bzl b/python/private/pypi/evaluate_markers.bzl
28+
index c805fd7a..e57e6138 100644
29+
--- a/python/private/pypi/evaluate_markers.bzl
30+
+++ b/python/private/pypi/evaluate_markers.bzl
31+
@@ -20,7 +20,7 @@ load(":pypi_repo_utils.bzl", "pypi_repo_utils")
32+
SRCS = [
33+
# When the version, or any of the files in `packaging` package changes,
34+
# this file will change as well.
35+
- Label("@pypi__packaging//:packaging-24.0.dist-info/RECORD"),
36+
+ Label("@pypi__packaging//:packaging-24.2.dist-info/RECORD"),
37+
Label("//python/private/pypi/requirements_parser:resolve_target_platforms.py"),
38+
Label("//python/private/pypi/whl_installer:platform.py"),
39+
]

third_party/tsl/third_party/py/python_init_rules.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ def python_init_rules():
88
sha256 = "62ddebb766b4d6ddf1712f753dac5740bea072646f630eb9982caa09ad8a7687",
99
strip_prefix = "rules_python-0.39.0",
1010
url = "https://github.com/bazelbuild/rules_python/releases/download/0.39.0/rules_python-0.39.0.tar.gz",
11+
patch_args = ["-p1"],
12+
patches = [Label("//third_party/py:rules_python.patch")],
1113
)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
diff --git a/python/private/pypi/deps.bzl b/python/private/pypi/deps.bzl
2+
index 8949ed4a..8d0ab0e7 100644
3+
--- a/python/private/pypi/deps.bzl
4+
+++ b/python/private/pypi/deps.bzl
5+
@@ -51,8 +51,8 @@ _RULE_DEPS = [
6+
),
7+
(
8+
"pypi__packaging",
9+
- "https://files.pythonhosted.org/packages/49/df/1fceb2f8900f8639e278b056416d49134fb8d84c5942ffaa01ad34782422/packaging-24.0-py3-none-any.whl",
10+
- "2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5",
11+
+ "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl",
12+
+ "09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759",
13+
),
14+
(
15+
"pypi__pep517",
16+
@@ -61,8 +61,8 @@ _RULE_DEPS = [
17+
),
18+
(
19+
"pypi__pip",
20+
- "https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl",
21+
- "ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc",
22+
+ "https://files.pythonhosted.org/packages/ef/7d/500c9ad20238fcfcb4cb9243eede163594d7020ce87bd9610c9e02771876/pip-24.3.1-py3-none-any.whl",
23+
+ "3790624780082365f47549d032f3770eeb2b1e8bd1f7b2e02dace1afa361b4ed",
24+
),
25+
(
26+
"pypi__pip_tools",
27+
diff --git a/python/private/pypi/evaluate_markers.bzl b/python/private/pypi/evaluate_markers.bzl
28+
index c805fd7a..e57e6138 100644
29+
--- a/python/private/pypi/evaluate_markers.bzl
30+
+++ b/python/private/pypi/evaluate_markers.bzl
31+
@@ -20,7 +20,7 @@ load(":pypi_repo_utils.bzl", "pypi_repo_utils")
32+
SRCS = [
33+
# When the version, or any of the files in `packaging` package changes,
34+
# this file will change as well.
35+
- Label("@pypi__packaging//:packaging-24.0.dist-info/RECORD"),
36+
+ Label("@pypi__packaging//:packaging-24.2.dist-info/RECORD"),
37+
Label("//python/private/pypi/requirements_parser:resolve_target_platforms.py"),
38+
Label("//python/private/pypi/whl_installer:platform.py"),
39+
]

0 commit comments

Comments
 (0)