Skip to content

Commit

Permalink
Upgrade rules_python to newest version.
Browse files Browse the repository at this point in the history
This requires moving off the soon to be deprecated pip_install to pip_parse and pinning the numpy version

PiperOrigin-RevId: 490345714
  • Loading branch information
deannagarcia authored and copybara-github committed Nov 22, 2022
1 parent 3e5fe00 commit 5251a44
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
8 changes: 6 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,17 @@ pinned_maven_install()
# For `cc_proto_blacklist_test` and `build_test`.
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

load("@rules_python//python:pip.bzl", "pip_install")
load("@rules_python//python:pip.bzl", "pip_parse")

pip_install(
pip_parse(
name="pip_deps",
requirements = "//python:requirements.txt"
)

load("@pip_deps//:requirements.bzl", "install_deps")

install_deps()

bazel_skylib_workspace()

load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
Expand Down
5 changes: 5 additions & 0 deletions kokoro/windows/prepare_build_win64.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@rem Update Chocolatey
choco upgrade -y --no-progress chocolatey
choco install -y python --version 3.10.0
choco install -y --no-progress --pre cmake

@rem Enable long paths.
Expand All @@ -14,3 +15,7 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary
@rem Convert Windows line breaks to Unix line breaks
@rem This allows text-matching tests to pass
@find . -type f -print0 | xargs -0 d2u

@rem Use python3
C:\python310\python.exe -m venv venv
call venv\Scripts\activate.bat
6 changes: 3 additions & 3 deletions protobuf_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ def protobuf_deps():
if not native.existing_rule("rules_python"):
http_archive(
name = "rules_python",
sha256 = "9fcf91dbcc31fde6d1edb15f117246d912c33c36f44cf681976bd886538deba6",
strip_prefix = "rules_python-0.8.0",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.8.0.tar.gz",
sha256 = "a868059c8c6dd6ad45a205cca04084c652cfe1852e6df2d5aca036f6e5438380",
strip_prefix = "rules_python-0.14.0",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.14.0.tar.gz",
)

if not native.existing_rule("rules_jvm_external"):
Expand Down
2 changes: 1 addition & 1 deletion python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
numpy
numpy==1.21.6

0 comments on commit 5251a44

Please sign in to comment.