eli-schwartz commented on code in PR #45854:
URL: https://github.com/apache/arrow/pull/45854#discussion_r2001972553


##########
python/meson.build:
##########
@@ -0,0 +1,71 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+project(
+    'pyarrow',
+    'cpp',
+    'cython',
+    license: 'Apache-2.0',
+    meson_version: '>=1.4.0',
+    default_options: ['warning_level=2', 'cpp_std=c++17'],
+)
+
+cmake = import('cmake')
+cmake_opt = cmake.subproject_options()

Review Comment:
   It is possible to avoid doing if/else checks:
   
   ```
   $ cat subprojects/arrow.wrap
   
   [wrap-file]
   directory = arrow
   method = cmake
   
   [provide]
   arrow = arrow_static_dep
   ```
   
   However, using wrap files with method=cmake doesn't (currently) allow you to 
pass your `add_cmake_defines`. If you didn't need any defines, then you could 
simply do this:
   
   ```meson
   arrow_dep = dependency('arrow', 'Arrow', modules: ['Arrow::arrow_shared'])
   ```
   
   and you would not need any if/else, it would automatically build the cmake 
subproject if either:
   - wrap-mode=forcefallback
   - no system arrow was found
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to