mirror of
https://github.com/google/re2.git
synced 2025-10-15 12:17:02 +08:00
Tidy up the Python build a little.
Change-Id: I0b152cd0820df0e1e316dbc949e0548043a16600 Reviewed-on: https://code-review.googlesource.com/c/re2/+/61471 Reviewed-by: Alex Chernyakhovsky <achernya@google.com> Reviewed-by: Paul Wankadia <junyer@google.com>
This commit is contained in:
@@ -51,9 +51,6 @@ class BuildExt(setuptools.command.build_ext.build_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()}')
|
||||
@@ -65,6 +62,9 @@ class BuildExt(setuptools.command.build_ext.build_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:
|
||||
|
Reference in New Issue
Block a user