diff --git a/.bazelrc b/.bazelrc index 101066fc53..5b3a499af8 100644 --- a/.bazelrc +++ b/.bazelrc @@ -84,4 +84,7 @@ common:ci --repo_env="WPI_PUBLISH_CLASSIFIER_FILTER=headers,sources,linuxsystemc common:ci_windows_x86 --repo_env="WPI_PUBLISH_CLASSIFIER_FILTER=headers,sources,linuxsystemcore,linuxsystemcoredebug,linuxsystemcorestatic,linuxsystemcorestaticdebug,linuxx86-64,linuxx86-64debug,linuxx86-64static,linuxx86-64staticdebug,osxuniversal,osxuniversaldebug,osxuniversalstatic,osxuniversalstaticdebug,windowsx86-64,windowsx86-64debug,windowsx86-64static,windowsx86-64staticdebug" common:ci_windows_arm --repo_env="WPI_PUBLISH_CLASSIFIER_FILTER=headers,sources,linuxsystemcore,linuxsystemcoredebug,linuxsystemcorestatic,linuxsystemcorestaticdebug,linuxx86-64,linuxx86-64debug,linuxx86-64static,linuxx86-64staticdebug,osxuniversal,osxuniversaldebug,osxuniversalstatic,osxuniversalstaticdebug,windowsarm64,windowsarm64debug,windowsarm64static,windowsarm64staticdebug" +build --@rules_python//python/config_settings:bootstrap_impl=script +build --@rules_python//python/config_settings:venvs_use_declare_symlink=no + try-import %workspace%/bazel_auth.rc diff --git a/WORKSPACE b/WORKSPACE index c172881a36..7bb5acddaa 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -42,18 +42,18 @@ http_archive( http_archive( name = "rules_pkg", - sha256 = "cad05f864a32799f6f9022891de91ac78f30e0fa07dc68abac92a628121b5b11", + sha256 = "b7215c636f22c1849f1c3142c72f4b954bb12bb8dcf3cbe229ae6e69cc6479db", urls = [ - "https://github.com/bazelbuild/rules_pkg/releases/download/1.0.0/rules_pkg-1.0.0.tar.gz", + "https://github.com/bazelbuild/rules_pkg/releases/download/1.1.0/rules_pkg-1.1.0.tar.gz", ], ) # Rules Python http_archive( name = "rules_python", - sha256 = "9f9f3b300a9264e4c77999312ce663be5dee9a56e361a1f6fe7ec60e1beef9a3", - strip_prefix = "rules_python-1.4.1", - url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.1/rules_python-1.4.1.tar.gz", + sha256 = "6b9185460d11d57a32139b103363fce39d81889206561ef582678273b74372ac", + strip_prefix = "rules_python-1.7.0-rc5", + url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc5/rules_python-1.7.0-rc5.tar.gz", ) # Download Extra java rules diff --git a/hal/generate_nanopb.py b/hal/generate_nanopb.py index 47e9898f75..9c68b1a05d 100644 --- a/hal/generate_nanopb.py +++ b/hal/generate_nanopb.py @@ -19,9 +19,9 @@ def generate_nanopb(nanopb: Path, output_directory: Path, proto_dir: Path): proto_files = proto_dir.glob("*.proto") for path in proto_files: absolute_filename = path.absolute() - subprocess.run( - [ - sys.executable, + subprocess.check_call( + ([sys.executable] if nanopb.endswith(".py") else []) + + [ nanopb, f"-I{absolute_filename.parent}", f"-D{output_directory.absolute()}", @@ -29,7 +29,6 @@ def generate_nanopb(nanopb: Path, output_directory: Path, proto_dir: Path): "-e.npb", absolute_filename, ], - check=True, ) java_files = (output_directory).glob("*") for java_file in java_files: diff --git a/wpimath/generate_nanopb.py b/wpimath/generate_nanopb.py index d8bf6d5b77..a641db11f3 100755 --- a/wpimath/generate_nanopb.py +++ b/wpimath/generate_nanopb.py @@ -20,15 +20,15 @@ def generate_nanopb(nanopb: Path, output_directory: Path, proto_dir: Path): for path in proto_files: absolute_filename = path.absolute() subprocess.check_call( - [ - sys.executable, + ([sys.executable] if nanopb.endswith(".py") else []) + + [ nanopb, f"-I{absolute_filename.parent}", f"-D{output_directory.absolute()}", "-S.cpp", "-e.npb", absolute_filename, - ] + ], ) java_files = (output_directory).glob("*") for java_file in java_files: diff --git a/wpiutil/generate_nanopb.py b/wpiutil/generate_nanopb.py index f514b5d2b6..ff4c79aec8 100755 --- a/wpiutil/generate_nanopb.py +++ b/wpiutil/generate_nanopb.py @@ -19,9 +19,9 @@ def generate_nanopb(nanopb: Path, output_directory: Path, proto_dir: Path): proto_files = proto_dir.glob("*.proto") for path in proto_files: absolute_filename = path.absolute() - subprocess.run( - [ - sys.executable, + subprocess.check_call( + ([sys.executable] if nanopb.endswith(".py") else []) + + [ nanopb, f"-I{absolute_filename.parent}", f"-D{output_directory.absolute()}", @@ -29,7 +29,6 @@ def generate_nanopb(nanopb: Path, output_directory: Path, proto_dir: Path): "-e.npb", absolute_filename, ], - check=True, ) java_files = (output_directory).glob("*") for java_file in java_files: