19
19
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
# SOFTWARE.
22
+ import os
22
23
23
24
from conan import ConanFile
24
25
from conan .errors import ConanInvalidConfiguration , ConanException
28
29
from conan .tools .microsoft import is_msvc , is_msvc_static_runtime
29
30
from conan .tools .scm import Version
30
31
31
- import os
32
- import glob
33
-
34
32
required_conan_version = ">=2.1.0"
35
33
34
+
36
35
class ArrowConan (ConanFile ):
37
36
name = "arrow"
38
37
description = "Apache Arrow is a cross-language development platform for in-memory data"
@@ -102,7 +101,7 @@ class ArrowConan(ConanFile):
102
101
"dataset_modules" : False ,
103
102
"deprecated" : True ,
104
103
"encryption" : False ,
105
- "filesystem_layer" : False ,
104
+ "filesystem_layer" : True ,
106
105
"hdfs_bridgs" : False ,
107
106
"plasma" : "deprecated" ,
108
107
"simd_level" : "default" ,
@@ -142,7 +141,7 @@ class ArrowConan(ConanFile):
142
141
def _min_cppstd (self ):
143
142
# arrow >= 10.0.0 requires C++17.
144
143
# https://github.com/apache/arrow/pull/13991
145
- return "11" if Version ( self . version ) < "10.0.0" else " 17"
144
+ return "17"
146
145
147
146
def export_sources (self ):
148
147
export_conandata_patches (self )
@@ -151,10 +150,10 @@ def export_sources(self):
151
150
def config_options (self ):
152
151
if self .settings .os == "Windows" :
153
152
del self .options .fPIC
154
- if Version (self .version ) < "8.0.0" :
155
- del self .options .substrait
156
153
if is_msvc (self ):
157
154
self .options .with_boost = True
155
+ if Version (self .version ) >= "19.0.0" :
156
+ self .options .with_mimalloc = True
158
157
159
158
def configure (self ):
160
159
if self .options .shared :
@@ -209,9 +208,6 @@ def requirements(self):
209
208
self .requires ("snappy/1.1.9" )
210
209
if self .options .get_safe ("simd_level" ) != None or \
211
210
self .options .get_safe ("runtime_simd_level" ) != None :
212
- if Version (self .version ) < 8 :
213
- self .requires ("xsimd/9.0.1" )
214
- else :
215
211
self .requires ("xsimd/13.0.0" )
216
212
if self .options .with_zlib :
217
213
self .requires ("zlib/[>=1.2.11 <2]" )
@@ -253,15 +249,6 @@ def validate(self):
253
249
if self .settings .compiler .get_safe ("cppstd" ):
254
250
check_min_cppstd (self , self ._min_cppstd )
255
251
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
-
265
252
if self .options .get_safe ("skyhook" , False ):
266
253
raise ConanInvalidConfiguration ("CCI has no librados recipe (yet)" )
267
254
if self .options .with_cuda :
@@ -425,28 +412,11 @@ def generate(self):
425
412
tc .generate ()
426
413
427
414
deps = CMakeDeps (self )
415
+ deps .set_property ("mimalloc" , "cmake_target_name" , "mimalloc::mimalloc" )
428
416
deps .generate ()
429
417
430
418
def _patch_sources (self ):
431
419
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 )
450
420
451
421
def build (self ):
452
422
self ._patch_sources ()
@@ -464,29 +434,6 @@ def package(self):
464
434
rmdir (self , os .path .join (self .package_folder , "lib" , "pkgconfig" ))
465
435
rmdir (self , os .path .join (self .package_folder , "share" ))
466
436
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
-
490
437
def package_info (self ):
491
438
# FIXME: fix CMake targets of components
492
439
@@ -556,6 +503,8 @@ def package_info(self):
556
503
self .cpp_info .components ["dataset" ].libs = ["arrow_dataset" ]
557
504
if self .options .parquet :
558
505
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" ]
559
508
560
509
if self .options .cli and (self .options .with_cuda or self .options .with_flight_rpc or self .options .parquet ):
561
510
binpath = os .path .join (self .package_folder , "bin" )
0 commit comments