Skip to content

Commit

Permalink
Tidy up the Python build a little.
Browse files Browse the repository at this point in the history
Change-Id: I0b152cd0820df0e1e316dbc949e0548043a16600
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61471
Reviewed-by: Alex Chernyakhovsky <[email protected]>
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Jun 30, 2023
1 parent 5a0e23b commit c53443c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ def build_extension(self, ext):
# For @pybind11_bazel's `python_configure()`.
os.environ['PYTHON_BIN_PATH'] = sys.executable

cmd = ['bazel', 'clean', '--expunge']
self.spawn(cmd)

cmd = ['bazel', 'build']
if 'BAZEL_CPU' in os.environ:
cmd.append(f'--cpu={os.environ["BAZEL_CPU"].lower()}')
Expand All @@ -65,6 +62,9 @@ def build_extension(self, ext):
shutil.copyfile('../bazel-bin/python/_re2.so',
self.get_ext_fullpath(ext.name))

cmd = ['bazel', 'clean', '--expunge']
self.spawn(cmd)


def include_dirs():
try:
Expand Down

0 comments on commit c53443c

Please sign in to comment.