We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 809c004 commit bd25e6dCopy full SHA for bd25e6d
1 file changed
setup.py
@@ -82,6 +82,15 @@ def finalize_options(self):
82
self._additional_build_options = ["--macos_minimum_os=10.14"]
83
84
def run(self):
85
+ bazelversion_path = os.path.join(
86
+ os.path.dirname(os.path.realpath(__file__)), ".bazelversion"
87
+ )
88
+ if os.path.exists(bazelversion_path):
89
+ with open(bazelversion_path, "r") as f:
90
+ bazel_version = f.read().strip()
91
+ if "USE_BAZEL_VERSION" not in os.environ:
92
+ os.environ["USE_BAZEL_VERSION"] = bazel_version
93
+
94
subprocess.check_call(
95
[self._bazel_cmd, "run", "-c", "opt"]
96
+ self._additional_build_options
0 commit comments