diff --git a/python/pyarrow/src_arrow/CMakeLists.txt b/python/pyarrow/src_arrow/CMakeLists.txt index 6ef9fec0d67af..08e8f7e962415 100644 --- a/python/pyarrow/src_arrow/CMakeLists.txt +++ b/python/pyarrow/src_arrow/CMakeLists.txt @@ -223,6 +223,9 @@ if(ARROW_FLIGHT AND ARROW_BUILD_SHARED) # fail with weird errors due to multiple copies of global static state (The # other solution is to link gRPC shared everywhere instead of statically only # in Flight) + + + add_arrow_lib(arrow_python_flight CMAKE_PACKAGE_NAME ArrowPythonFlight diff --git a/python/setup.py b/python/setup.py index 96bdb068f8814..dc18efd41351d 100755 --- a/python/setup.py +++ b/python/setup.py @@ -279,11 +279,12 @@ def _run_cmake_cpyarrow(self): print(f"moving {build_temp} to {build_lib}") #shutil.move(build_temp, pjoin(build_lib, "pyarrow")) # a bit hacky - for libname in ["libarrow_python.so", "libarrow_python.so.900", "libarrow_python.so.900.0.0"]: - libname_path = pjoin(build_lib, "pyarrow", libname) - if os.path.exists(libname_path): - os.remove(libname_path) - shutil.move(pjoin(build_temp, libname), pjoin(build_lib, "pyarrow")) + for libname in os.listdir(build_temp): + if "libarrow_python" in libname: + libname_path = pjoin(build_lib, "pyarrow", libname) + if os.path.exists(libname_path): + os.remove(libname_path) + shutil.move(pjoin(build_temp, libname), pjoin(build_lib, "pyarrow")) if not os.path.isdir(pjoin(build_include, "arrow")): self.mkpath(pjoin(build_include, "arrow")) shutil.move(pjoin(build_include, "arrow", "python"), pjoin(build_lib, "pyarrow", "include", "arrow", "python"))