Skip to content

Commit

Permalink
issue: 882
Browse files Browse the repository at this point in the history
Upgrading rules_python version and fixed a regression test issue
  • Loading branch information
sjonnalagadda authored and Sridhar committed Aug 17, 2024
1 parent 447fb8e commit f7574a8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module(

# Do not update to newer versions until you need a specific new feature.
bazel_dep(name = "rules_license", version = "0.0.7")
bazel_dep(name = "rules_python", version = "0.31.0")
bazel_dep(name = "rules_python", version = "0.34.0")
bazel_dep(name = "bazel_skylib", version = "1.4.2")

# Only for development
Expand Down
4 changes: 2 additions & 2 deletions distro/packaging_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def testBuild(self):
'file://%s' % local_path, self.source_repo, sha256,
rename_repo=self.dest_repo,
deps_method='rules_pkg_dependencies'
)
),
release_tools.rules_python_internal_content()
))
workspace.write(workspace_content)
if _VERBOSE:
Expand All @@ -90,7 +91,6 @@ def CopyTestFile(source_name, dest_name):
out.write(content)

CopyTestFile('BUILD.tpl', 'BUILD')

os.chdir(tempdir)
build_result = subprocess.check_output(['bazel', 'build', ':dummy_tar'])
if _VERBOSE:
Expand Down
6 changes: 3 additions & 3 deletions pkg/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def rules_pkg_dependencies():

http_archive(
name = "rules_python",
sha256 = "0a8003b044294d7840ac7d9d73eef05d6ceb682d7516781a4ec62eeb34702578",
strip_prefix = "rules_python-0.24.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.24.0/rules_python-0.24.0.tar.gz",
sha256 = "778aaeab3e6cfd56d681c89f5c10d7ad6bf8d2f1a72de9de55b23081b2d31618",
strip_prefix = "rules_python-0.34.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.34.0/rules_python-0.34.0.tar.gz",
)

http_archive(
Expand Down
7 changes: 7 additions & 0 deletions pkg/releasing/release_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,10 @@ def workspace_content(
ret += '%s()\n' % m

return ret

def rules_python_internal_content():
ret = 'load("@rules_python//:internal_deps.bzl", "rules_python_internal_deps")'
ret += '\n\nrules_python_internal_deps()\n'
ret += 'load("@rules_python//:internal_setup.bzl", "rules_python_internal_setup")'
ret += '\n\nrules_python_internal_setup()\n'
return ret

0 comments on commit f7574a8

Please sign in to comment.