Skip to content

Commit ce4e7fb

Browse files
committed
GH-46757: [CI][Packaging][Conan] Synchronize upstream conan
1 parent 5a52916 commit ce4e7fb

File tree

7 files changed

+95
-62
lines changed

7 files changed

+95
-62
lines changed

ci/conan/all/conandata.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
# SOFTWARE.
2222

2323
sources:
24+
"19.0.1":
25+
url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-19.0.1/apache-arrow-19.0.1.tar.gz?action=download"
26+
sha256: "acb76266e8b0c2fbb7eb15d542fbb462a73b3fd1e32b80fad6c2fafd95a51160"
2427
"18.1.0":
2528
url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-18.1.0/apache-arrow-18.1.0.tar.gz?action=download"
2629
sha256: "2dc8da5f8796afe213ecc5e5aba85bb82d91520eff3cf315784a52d0fa61d7fc"
@@ -40,6 +43,13 @@ sources:
4043
url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-14.0.2/apache-arrow-14.0.2.tar.gz?action=download"
4144
sha256: "1304dedb41896008b89fe0738c71a95d9b81752efc77fa70f264cb1da15d9bc2"
4245
patches:
46+
"19.0.1":
47+
- patch_file: "patches/19.0.1-0001-fix-cmake.patch"
48+
patch_description: "use cci package"
49+
patch_type: "conan"
50+
- patch_file: "patches/19.0.1-0002-fix-downloaded-mimalloc.patch"
51+
patch_description: "use cci package"
52+
patch_type: "conan"
4353
"18.1.0":
4454
- patch_file: "patches/18.0.0-0001-fix-cmake.patch"
4555
patch_description: "use cci package"

ci/conan/all/conanfile.py

Lines changed: 9 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
22+
import os
2223

2324
from conan import ConanFile
2425
from conan.errors import ConanInvalidConfiguration, ConanException
@@ -28,11 +29,9 @@
2829
from conan.tools.microsoft import is_msvc, is_msvc_static_runtime
2930
from conan.tools.scm import Version
3031

31-
import os
32-
import glob
33-
3432
required_conan_version = ">=2.1.0"
3533

34+
3635
class ArrowConan(ConanFile):
3736
name = "arrow"
3837
description = "Apache Arrow is a cross-language development platform for in-memory data"
@@ -102,7 +101,7 @@ class ArrowConan(ConanFile):
102101
"dataset_modules": False,
103102
"deprecated": True,
104103
"encryption": False,
105-
"filesystem_layer": False,
104+
"filesystem_layer": True,
106105
"hdfs_bridgs": False,
107106
"plasma": "deprecated",
108107
"simd_level": "default",
@@ -142,7 +141,7 @@ class ArrowConan(ConanFile):
142141
def _min_cppstd(self):
143142
# arrow >= 10.0.0 requires C++17.
144143
# https://github.com/apache/arrow/pull/13991
145-
return "11" if Version(self.version) < "10.0.0" else "17"
144+
return "17"
146145

147146
def export_sources(self):
148147
export_conandata_patches(self)
@@ -151,10 +150,10 @@ def export_sources(self):
151150
def config_options(self):
152151
if self.settings.os == "Windows":
153152
del self.options.fPIC
154-
if Version(self.version) < "8.0.0":
155-
del self.options.substrait
156153
if is_msvc(self):
157154
self.options.with_boost = True
155+
if Version(self.version) >= "19.0.0":
156+
self.options.with_mimalloc = True
158157

159158
def configure(self):
160159
if self.options.shared:
@@ -209,9 +208,6 @@ def requirements(self):
209208
self.requires("snappy/1.1.9")
210209
if self.options.get_safe("simd_level") != None or \
211210
self.options.get_safe("runtime_simd_level") != None:
212-
if Version(self.version) < 8:
213-
self.requires("xsimd/9.0.1")
214-
else:
215211
self.requires("xsimd/13.0.0")
216212
if self.options.with_zlib:
217213
self.requires("zlib/[>=1.2.11 <2]")
@@ -253,15 +249,6 @@ def validate(self):
253249
if self.settings.compiler.get_safe("cppstd"):
254250
check_min_cppstd(self, self._min_cppstd)
255251

256-
if (
257-
Version(self.version) < "10.0.0"
258-
and self.settings.compiler == "clang"
259-
and Version(self.settings.compiler.version) < "3.9"
260-
):
261-
raise ConanInvalidConfiguration(
262-
f"{self.ref} requires C++11, which needs at least clang-3.9"
263-
)
264-
265252
if self.options.get_safe("skyhook", False):
266253
raise ConanInvalidConfiguration("CCI has no librados recipe (yet)")
267254
if self.options.with_cuda:
@@ -425,28 +412,11 @@ def generate(self):
425412
tc.generate()
426413

427414
deps = CMakeDeps(self)
415+
deps.set_property("mimalloc", "cmake_target_name", "mimalloc::mimalloc")
428416
deps.generate()
429417

430418
def _patch_sources(self):
431419
apply_conandata_patches(self)
432-
if Version(self.version) < "10.0.0":
433-
for filename in glob.glob(os.path.join(self.source_folder, "cpp", "cmake_modules", "Find*.cmake")):
434-
if os.path.basename(filename) not in [
435-
"FindArrow.cmake",
436-
"FindArrowAcero.cmake",
437-
"FindArrowCUDA.cmake",
438-
"FindArrowDataset.cmake",
439-
"FindArrowFlight.cmake",
440-
"FindArrowFlightSql.cmake",
441-
"FindArrowFlightTesting.cmake",
442-
"FindArrowPython.cmake",
443-
"FindArrowPythonFlight.cmake",
444-
"FindArrowSubstrait.cmake",
445-
"FindArrowTesting.cmake",
446-
"FindGandiva.cmake",
447-
"FindParquet.cmake",
448-
]:
449-
os.remove(filename)
450420

451421
def build(self):
452422
self._patch_sources()
@@ -464,29 +434,6 @@ def package(self):
464434
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
465435
rmdir(self, os.path.join(self.package_folder, "share"))
466436

467-
cmake_suffix = "shared" if self.options.shared else "static"
468-
469-
alias_map = { f"Arrow::arrow_{cmake_suffix}": f"arrow::arrow_{cmake_suffix}" }
470-
471-
if self.options.parquet:
472-
alias_map[f"Parquet::parquet_{cmake_suffix}"] = f"arrow::parquet_{cmake_suffix}"
473-
474-
if self.options.get_safe("substrait"):
475-
alias_map[f"Arrow::arrow_substrait_{cmake_suffix}"] = f"arrow::arrow_substrait_{cmake_suffix}"
476-
477-
if self.options.acero:
478-
alias_map[f"Arrow::arrow_acero_{cmake_suffix}"] = f"arrow::arrow_acero_{cmake_suffix}"
479-
480-
if self.options.gandiva:
481-
alias_map[f"Gandiva::gandiva_{cmake_suffix}"] = f"arrow::gandiva_{cmake_suffix}"
482-
483-
if self.options.with_flight_rpc:
484-
alias_map[f"ArrowFlight::arrow_flight_sql_{cmake_suffix}"] = f"arrow::arrow_flight_sql_{cmake_suffix}"
485-
486-
@property
487-
def _module_subfolder(self):
488-
return os.path.join("lib", "cmake")
489-
490437
def package_info(self):
491438
# FIXME: fix CMake targets of components
492439

@@ -556,6 +503,8 @@ def package_info(self):
556503
self.cpp_info.components["dataset"].libs = ["arrow_dataset"]
557504
if self.options.parquet:
558505
self.cpp_info.components["dataset"].requires = ["libparquet"]
506+
if self.options.acero and Version(self.version) >= "19.0.0":
507+
self.cpp_info.components["dataset"].requires = ["libacero"]
559508

560509
if self.options.cli and (self.options.with_cuda or self.options.with_flight_rpc or self.options.parquet):
561510
binpath = os.path.join(self.package_folder, "bin")
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
diff --git a/cpp/cmake_modules/FindThriftAlt.cmake b/cpp/cmake_modules/FindThriftAlt.cmake
2+
index 98a706d..edf195e 100644
3+
--- a/cpp/cmake_modules/FindThriftAlt.cmake
4+
+++ b/cpp/cmake_modules/FindThriftAlt.cmake
5+
@@ -45,22 +45,20 @@ endif()
6+
# * https://github.com/apache/thrift/pull/2725
7+
# * https://github.com/apache/thrift/pull/2726
8+
# * https://github.com/conda-forge/thrift-cpp-feedstock/issues/68
9+
-if(NOT WIN32)
10+
- set(find_package_args "")
11+
- if(ThriftAlt_FIND_VERSION)
12+
- list(APPEND find_package_args ${ThriftAlt_FIND_VERSION})
13+
- endif()
14+
- if(ThriftAlt_FIND_QUIETLY)
15+
- list(APPEND find_package_args QUIET)
16+
- endif()
17+
- find_package(Thrift ${find_package_args})
18+
- if(Thrift_FOUND)
19+
- set(ThriftAlt_FOUND TRUE)
20+
- add_executable(thrift::compiler IMPORTED)
21+
- set_target_properties(thrift::compiler PROPERTIES IMPORTED_LOCATION
22+
- "${THRIFT_COMPILER}")
23+
- return()
24+
- endif()
25+
+set(find_package_args "")
26+
+if(ThriftAlt_FIND_VERSION)
27+
+ list(APPEND find_package_args ${ThriftAlt_FIND_VERSION})
28+
+endif()
29+
+if(ThriftAlt_FIND_QUIETLY)
30+
+ list(APPEND find_package_args QUIET)
31+
+endif()
32+
+find_package(Thrift ${find_package_args})
33+
+if(Thrift_FOUND)
34+
+ set(ThriftAlt_FOUND TRUE)
35+
+ add_executable(thrift::compiler IMPORTED)
36+
+ set_target_properties(thrift::compiler PROPERTIES IMPORTED_LOCATION
37+
+ "${THRIFT_COMPILER}")
38+
+ return()
39+
endif()
40+
41+
function(extract_thrift_version)
42+
diff --git a/cpp/src/parquet/size_statistics.cc b/cpp/src/parquet/size_statistics.cc
43+
index 1ce6c937a..e45eef3f0 100644
44+
--- a/cpp/src/parquet/size_statistics.cc
45+
+++ b/cpp/src/parquet/size_statistics.cc
46+
@@ -18,9 +18,11 @@
47+
#include "parquet/size_statistics.h"
48+
49+
#include <algorithm>
50+
+#include <array>
51+
#include <numeric>
52+
#include <ostream>
53+
#include <string_view>
54+
+#include <vector>
55+
56+
#include "arrow/util/logging.h"
57+
#include "parquet/exception.h"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
2+
index abfe6d2..cc0f3c5 100644
3+
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
4+
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
5+
@@ -2259,6 +2259,10 @@ endif()
6+
# mimalloc - Cross-platform high-performance allocator, from Microsoft
7+
8+
if(ARROW_MIMALLOC)
9+
+ find_package(mimalloc REQUIRED CONFIG)
10+
+endif()
11+
+
12+
+if(0)
13+
if(NOT ARROW_ENABLE_THREADING)
14+
message(FATAL_ERROR "Can't use mimalloc with ARROW_ENABLE_THREADING=OFF")
15+
endif()

ci/conan/all/test_package/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23-
cmake_minimum_required(VERSION 3.8)
23+
cmake_minimum_required(VERSION 3.15)
2424
project(test_package LANGUAGES CXX)
2525

2626
find_package(Arrow REQUIRED CONFIG)

ci/conan/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
# SOFTWARE.
2222

2323
versions:
24+
"19.0.1":
25+
folder: all
2426
"18.1.0":
2527
folder: all
2628
"18.0.0":

ci/conan/merge_status.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
UPSTREAM_REVISION=a9b270f9d2052e193ce3c0a6c4e2fda0b0ac5ade
18+
UPSTREAM_REVISION=1729c3c2c3b0e9d058821fa00e8a54154415efc6

0 commit comments

Comments
 (0)