mirror of
https://github.com/google/re2.git
synced 2025-10-16 22:38:54 +08:00
Try using bazelbuild/setup-bazelisk
everywhere.
This should hopefully mean that the `bazel` command found first in the path is actually Bazelisk. Revert various previous attempts to get all this working... Change-Id: I9a6267aff334de3dc55c7333d83e67ad2ad4ef05 Reviewed-on: https://code-review.googlesource.com/c/re2/+/61610 Reviewed-by: Perry Lorier <perryl@google.com> Reviewed-by: Paul Wankadia <junyer@google.com>
This commit is contained in:
@@ -45,13 +45,13 @@ Known issues with regard to building the C++ extension:
|
||||
class BuildExt(setuptools.command.build_ext.build_ext):
|
||||
|
||||
def build_extension(self, ext):
|
||||
if 'BAZELISK' not in os.environ:
|
||||
if 'GITHUB_ACTIONS' not in os.environ:
|
||||
return super().build_extension(ext)
|
||||
|
||||
# For @pybind11_bazel's `python_configure()`.
|
||||
os.environ['PYTHON_BIN_PATH'] = sys.executable
|
||||
|
||||
cmd = [os.environ['BAZELISK'], 'build']
|
||||
cmd = ['bazel', 'build']
|
||||
if 'BAZEL_CPU' in os.environ:
|
||||
cmd.append(f'--cpu={os.environ["BAZEL_CPU"].lower()}')
|
||||
cmd += ['--compilation_mode=opt', '--', ':all']
|
||||
@@ -62,7 +62,7 @@ class BuildExt(setuptools.command.build_ext.build_ext):
|
||||
shutil.copyfile('../bazel-bin/python/_re2.so',
|
||||
self.get_ext_fullpath(ext.name))
|
||||
|
||||
cmd = [os.environ['BAZELISK'], 'clean', '--expunge']
|
||||
cmd = ['bazel', 'clean', '--expunge']
|
||||
self.spawn(cmd)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user