Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rules python to 0 28 #204

Merged
merged 2 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"enabled": true
},
"enabledManagers": [
"bazel",
"bazel-module",
"github-actions",
"pip_requirements",
"poetry",
Expand Down
5 changes: 4 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ bazel_dep(
bazel_dep(
name = "rules_python",
# Keep in sync with //third_party/dependencies.bzl
version = "0.27.0",
# Keep in sync with //examples/MODULE.bazel
# Keep in sync with //test/aspect/MODULE.bazel
# Keep in sync with //test/apply_fixes/execution_logic.py
version = "0.28.0",
)

non_module_dependencies = use_extension(
Expand Down
3 changes: 2 additions & 1 deletion examples/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ local_path_override(

bazel_dep(
name = "rules_python",
version = "0.27.0",
# Keep in sync with //examples/WORKSPACE
version = "0.28.0",
dev_dependency = True,
)

Expand Down
7 changes: 4 additions & 3 deletions examples/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ setup_step_2()
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")

# Keep in sync with //examples/MODULE.bazel
maybe(
http_archive,
name = "rules_python",
sha256 = "9acc0944c94adb23fba1c9988b48768b1bacc6583b52a2586895c5b7491e2e31",
strip_prefix = "rules_python-0.27.0",
urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.27.0/rules_python-0.27.0.tar.gz"],
sha256 = "d70cd72a7a4880f0000a6346253414825c19cdd40a28289bdf67b8e6480edff8",
strip_prefix = "rules_python-0.28.0",
urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.28.0/rules_python-0.28.0.tar.gz"],
)

load("@rules_python//python:repositories.bzl", "python_register_toolchains")
Expand Down
6 changes: 3 additions & 3 deletions test/apply_fixes/execution_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
maybe(
http_archive,
name = "rules_python",
sha256 = "9acc0944c94adb23fba1c9988b48768b1bacc6583b52a2586895c5b7491e2e31",
strip_prefix = "rules_python-0.27.0",
urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.27.0/rules_python-0.27.0.tar.gz"],
sha256 = "d70cd72a7a4880f0000a6346253414825c19cdd40a28289bdf67b8e6480edff8",
strip_prefix = "rules_python-0.28.0",
urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.28.0/rules_python-0.28.0.tar.gz"],
)

load("@rules_python//python:repositories.bzl", "python_register_toolchains")
Expand Down
3 changes: 2 additions & 1 deletion test/aspect/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ local_path_override(
## Python toolchains for testing compatibility to various Python versions
##

# Keep in sync with //test/aspect/WORKSPACE
bazel_dep(
name = "rules_python",
version = "0.27.0",
version = "0.28.0",
dev_dependency = True,
)

Expand Down
7 changes: 4 additions & 3 deletions test/aspect/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ setup_step_2()
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")

# Keep in sync with //test/aspect/MODULE.bazel
maybe(
http_archive,
name = "rules_python",
sha256 = "9acc0944c94adb23fba1c9988b48768b1bacc6583b52a2586895c5b7491e2e31",
strip_prefix = "rules_python-0.27.0",
urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.27.0/rules_python-0.27.0.tar.gz"],
sha256 = "d70cd72a7a4880f0000a6346253414825c19cdd40a28289bdf67b8e6480edff8",
strip_prefix = "rules_python-0.28.0",
urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.28.0/rules_python-0.28.0.tar.gz"],
)

load("@rules_python//python:repositories.bzl", "python_register_multi_toolchains")
Expand Down
15 changes: 6 additions & 9 deletions third_party/dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,28 @@ load("@depend_on_what_you_use//third_party/pcpp:repository.bzl", "pcpp")

def dependencies():
# Keep in sync with MODULE.bazel
rules_python_version = "0.27.0"
maybe(
http_archive,
name = "rules_python",
sha256 = "9acc0944c94adb23fba1c9988b48768b1bacc6583b52a2586895c5b7491e2e31",
strip_prefix = "rules_python-{}".format(rules_python_version),
urls = ["https://github.com/bazelbuild/rules_python/releases/download/{v}/rules_python-{v}.tar.gz".format(v = rules_python_version)],
sha256 = "d70cd72a7a4880f0000a6346253414825c19cdd40a28289bdf67b8e6480edff8",
strip_prefix = "rules_python-0.28.0",
urls = ["https://github.com/bazelbuild/rules_python/releases/download/0.28.0/rules_python-0.28.0.tar.gz"],
)

# Keep in sync with MODULE.bazel
rules_cc_version = "0.0.9"
maybe(
http_archive,
name = "rules_cc",
sha256 = "2037875b9a4456dce4a79d112a8ae885bbc4aad968e6587dca6e64f3a0900cdf",
strip_prefix = "rules_cc-{}".format(rules_cc_version),
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/{v}/rules_cc-{v}.tar.gz".format(v = rules_cc_version)],
strip_prefix = "rules_cc-0.0.9",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz"],
)

# Keep in sync with MODULE.bazel
skylib_version = "1.5.0"
http_archive(
name = "bazel_skylib",
sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94",
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/{v}/bazel-skylib-{v}.tar.gz".format(v = skylib_version)],
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz"],
)

pcpp()
5 changes: 2 additions & 3 deletions third_party/pcpp/repository.bzl
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

def pcpp():
version = "1.30"
http_archive(
name = "dwyu_pcpp",
sha256 = "5af9fbce55f136d7931ae915fae03c34030a3b36c496e72d9636cedc8e2543a1",
strip_prefix = "pcpp-{}".format(version),
strip_prefix = "pcpp-1.30",
build_file = "@depend_on_what_you_use//third_party/pcpp:pcpp.BUILD",
urls = [
"https://files.pythonhosted.org/packages/41/07/876153f611f2c610bdb8f706a5ab560d888c938ea9ea65ed18c374a9014a/pcpp-{v}.tar.gz".format(v = version),
"https://files.pythonhosted.org/packages/41/07/876153f611f2c610bdb8f706a5ab560d888c938ea9ea65ed18c374a9014a/pcpp-1.30.tar.gz",
],
)