arrow: don't use when as a keyword argument to filter_file() (#35065)

Co-authored-by: thomas-bouvier <thomas-bouvier@users.noreply.github.com>
This commit is contained in:
Thomas Bouvier 2023-01-22 09:05:37 +01:00 committed by GitHub
parent ce8727cece
commit b7a68938c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,19 +101,19 @@ def patch(self):
r"(include_directories\()SYSTEM ", r"\1", "cpp/cmake_modules/ThirdpartyToolchain.cmake" r"(include_directories\()SYSTEM ", r"\1", "cpp/cmake_modules/ThirdpartyToolchain.cmake"
) )
filter_file( if self.spec.satisfies("@:2.0.0"):
r'set\(ARROW_LLVM_VERSIONS "10" "9" "8" "7"\)', filter_file(
'set(ARROW_LLVM_VERSIONS "11" "10" "9" "8" "7")', r'set\(ARROW_LLVM_VERSIONS "10" "9" "8" "7"\)',
"cpp/CMakeLists.txt", 'set(ARROW_LLVM_VERSIONS "11" "10" "9" "8" "7")',
when="@:2.0.0", "cpp/CMakeLists.txt",
) )
filter_file(
filter_file( r"#include <llvm/Support/DynamicLibrary\.h>",
r"#include <llvm/Support/DynamicLibrary\.h>", r"#include <llvm/Support/DynamicLibrary.h>"
r"#include <llvm/Support/DynamicLibrary.h>" + "\n" + r"#include <llvm/Support/Host.h>", + "\n"
"cpp/src/gandiva/engine.cc", + r"#include <llvm/Support/Host.h>",
when="@2.0.0", "cpp/src/gandiva/engine.cc",
) )
def cmake_args(self): def cmake_args(self):
args = ["-DARROW_DEPENDENCY_SOURCE=SYSTEM", "-DARROW_NO_DEPRECATED_API=ON"] args = ["-DARROW_DEPENDENCY_SOURCE=SYSTEM", "-DARROW_NO_DEPRECATED_API=ON"]