summaryrefslogtreecommitdiffstats
path: root/src/arrow/dev/tasks/conda-recipes/arrow-cpp/meta.yaml
blob: 48a8629866d9ff920ab21c46ad6dfe55657ebaa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
# NOTE: In constrast to the conda-forge recipe, ARROW_VERSION is a templated variable here.
{% set version = ARROW_VERSION %}
{% set cuda_enabled = cuda_compiler_version != "None" %}
{% set build_ext_version = ARROW_VERSION %}
{% set build_ext = "cuda" if cuda_enabled else "cpu" %}
{% set proc_build_number = "0" %}

package:
  name: arrow-cpp-ext
  version: {{ version }}

source:
  path: ../../../../

build:
  number: 0
  # for cuda on win/linux, building with 9.2 is enough to be compatible with all later versions,
  # since arrow is only using libcuda, and not libcudart.
  skip: true  # [(win or linux) and cuda_compiler_version not in ("None", "10.2")]
  skip: true  # [osx and cuda_compiler_version != "None"]
  run_exports:
    - {{ pin_subpackage("arrow-cpp", max_pin="x.x.x") }}

outputs:
  - name: arrow-cpp-proc
    version: {{ build_ext_version }}
    build:
      number: {{ proc_build_number }}
      string: "{{ build_ext }}"
    test:
      commands:
        - exit 0
    about:
      home: http://github.com/apache/arrow
      license: Apache-2.0
      license_file:
        - LICENSE.txt
      summary: 'A meta-package to select Arrow build variant'

  - name: arrow-cpp
    script: build-arrow.sh  # [not win]
    script: bld-arrow.bat   # [win]
    version: {{ version }}
    build:
      string: py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ build_ext }}
      run_exports:
        - {{ pin_subpackage("arrow-cpp", max_pin="x.x.x") }}
      ignore_run_exports:
        - cudatoolkit
      track_features:
        {{ "- arrow-cuda" if cuda_enabled else "" }}
    requirements:
      build:
        - python                                 # [build_platform != target_platform]
        - cross-python_{{ target_platform }}     # [build_platform != target_platform]
        - cython                                 # [build_platform != target_platform]
        - numpy                                  # [build_platform != target_platform]
        - gnuconfig                              # [osx and arm64]
        - libprotobuf
        - grpc-cpp
        - cmake
        - autoconf  # [unix]
        - ninja
        - make  # [unix]
        - {{ compiler('c') }}
        - {{ compiler('cxx') }}
        - {{ compiler("cuda") }}  # [cuda_compiler_version != "None"]
      host:
        - aws-sdk-cpp
        - boost-cpp >=1.70
        - brotli
        - bzip2
        - c-ares
        - gflags
        - glog
        - grpc-cpp
        - libprotobuf
        - clangdev 10  # [not (osx and arm64)]
        - llvmdev 10   # [not (osx and arm64)]
        - libutf8proc
        - lz4-c
        - numpy
        - orc  # [unix]
        - python
        - rapidjson
        - re2
        - snappy
        - thrift-cpp
        - zlib
        - zstd
      run:
        - {{ pin_compatible('numpy', lower_bound='1.16') }}
        - python
      run_constrained:
        - arrow-cpp-proc * {{ build_ext }}
        - cudatoolkit >=9.2  # [cuda_compiler_version != "None"]

    about:
      home: http://github.com/apache/arrow
      license: Apache-2.0
      license_file:
        - LICENSE.txt
      summary: C++ libraries for Apache Arrow

    test:
      commands:
        # headers
        - test -f $PREFIX/include/arrow/api.h              # [unix]
        - test -f $PREFIX/include/arrow/flight/types.h     # [unix]
        - test -f $PREFIX/include/plasma/client.h          # [unix]
        - test -f $PREFIX/include/gandiva/engine.h         # [unix and not (osx and arm64)]
        - test -f $PREFIX/include/parquet/api/reader.h     # [unix]
        - if not exist %LIBRARY_INC%\\arrow\\api.h exit 1            # [win]
        - if not exist %LIBRARY_INC%\\gandiva\\engine.h exit 1       # [win]
        - if not exist %LIBRARY_INC%\\parquet\\api\\reader.h exit 1  # [win]

        # shared
        - test -f $PREFIX/lib/libarrow.so            # [linux]
        - test -f $PREFIX/lib/libarrow_dataset.so    # [linux]
        - test -f $PREFIX/lib/libarrow_flight.so     # [linux]
        - test -f $PREFIX/lib/libarrow_python.so     # [linux]
        - test -f $PREFIX/lib/libparquet.so          # [linux]
        - test -f $PREFIX/lib/libgandiva.so          # [linux]
        - test -f $PREFIX/lib/libplasma.so           # [linux]
        - test -f $PREFIX/lib/libarrow_cuda${SHLIB_EXT}               # [(cuda_compiler_version != "None") and unix]
        - test ! -f $PREFIX/lib/libarrow_cuda${SHLIB_EXT}             # [(cuda_compiler_version == "None") and unix]
        - if not exist %PREFIX%\\Library\\bin\\arrow_cuda.dll exit 1  # [(cuda_compiler_version != "None") and win]
        - if exist %PREFIX%\\Library\\bin\\arrow_cuda.dll exit 1      # [(cuda_compiler_version == "None") and win]
        - test -f $PREFIX/lib/libarrow.dylib          # [osx]
        - test -f $PREFIX/lib/libarrow_dataset.dylib  # [osx]
        - test -f $PREFIX/lib/libarrow_python.dylib   # [osx]
        - test -f $PREFIX/lib/libgandiva.dylib        # [osx and not arm64]
        - test -f $PREFIX/lib/libparquet.dylib        # [osx]
        - test -f $PREFIX/lib/libplasma.dylib         # [osx]
        - if not exist %PREFIX%\\Library\\bin\\arrow.dll exit 1          # [win]
        - if not exist %PREFIX%\\Library\\bin\\arrow_dataset.dll exit 1  # [win]
        - if not exist %PREFIX%\\Library\\bin\\arrow_flight.dll exit 1   # [win]
        - if not exist %PREFIX%\\Library\\bin\\arrow_python.dll exit 1   # [win]
        - if not exist %PREFIX%\\Library\\bin\\parquet.dll exit 1        # [win]
        - if not exist %PREFIX%\\Library\\bin\\gandiva.dll exit 1        # [win]

        # absence of static libraries
        - test ! -f $PREFIX/lib/libarrow.a          # [unix]
        - test ! -f $PREFIX/lib/libarrow_dataset.a  # [unix]
        - test ! -f $PREFIX/lib/libarrow_flight.a   # [unix]
        - test ! -f $PREFIX/lib/libarrow_python.a   # [unix]
        - test ! -f $PREFIX/lib/libplasma.a         # [unix]
        - test ! -f $PREFIX/lib/libparquet.a        # [unix]
        - test ! -f $PREFIX/lib/libgandiva.a        # [unix]
        - if exist %PREFIX%\\Library\\lib\\arrow_static.lib exit 1          # [win]
        - if exist %PREFIX%\\Library\\lib\\arrow_dataset_static.lib exit 1  # [win]
        - if exist %PREFIX%\\Library\\lib\\arrow_flight_static.lib exit 1   # [win]
        - if exist %PREFIX%\\Library\\lib\\arrow_python_static.lib exit 1   # [win]
        - if exist %PREFIX%\\Library\\lib\\parquet_static.lib exit 1        # [win]
        - if exist %PREFIX%\\Library\\lib\\gandiva_static.lib exit 1        # [win]

  - name: pyarrow
    script: build-pyarrow.sh  # [not win]
    script: bld-pyarrow.bat   # [win]
    version: {{ version }}
    build:
      string: py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ build_ext }}
      ignore_run_exports:
        - cudatoolkit
      track_features:
        {{ "- arrow-cuda" if cuda_enabled else "" }}
    requirements:
      build:
        - python                                 # [build_platform != target_platform]
        - cross-python_{{ target_platform }}     # [build_platform != target_platform]
        - cython                                 # [build_platform != target_platform]
        - numpy                                  # [build_platform != target_platform]
        - cmake
        - ninja
        - make  # [unix]
        - {{ compiler('c') }}
        - {{ compiler('cxx') }}
        # pyarrow does not require nvcc but it needs to link against libraries in arrow-cpp=*=*cuda
        - {{ compiler("cuda") }}  # [cuda_compiler_version != "None"]
      host:
        - {{ pin_subpackage('arrow-cpp', exact=True) }}
        - cython
        - numpy
        - python
        - setuptools
        - setuptools_scm
        - six
      run:
        - {{ pin_subpackage('arrow-cpp', exact=True) }}
        - {{ pin_compatible('numpy', lower_bound='1.16') }}
        # empty parquet-cpp metapackage, force old versions to be uninstalled
        - parquet-cpp 1.5.1.*
        - python
      run_constrained:
        - arrow-cpp-proc * {{ build_ext }}
        - cudatoolkit >=9.2  # [cuda_compiler_version != "None"]

    about:
      home: http://github.com/apache/arrow
      license: Apache-2.0
      license_file:
        - LICENSE.txt
      summary: Python libraries for Apache Arrow

    test:
      imports:
        - pyarrow
        - pyarrow.dataset
        - pyarrow.flight
        - pyarrow.gandiva  # [not (osx and arm64)]
        - pyarrow.orc      # [unix]
        - pyarrow.parquet
        - pyarrow.plasma   # [unix]
        - pyarrow.fs
        - pyarrow._s3fs
        - pyarrow._hdfs
        # We can only test importing cuda package but cannot run when a
        # CUDA device is not available, for instance, when building from CI.
        # On Windows, we cannot even do that due to `nvcuda.dll` not being found, see
        # https://conda-forge.org/docs/maintainer/knowledge_base.html#nvcuda-dll-cannot-be-found-on-windows
        # However, we check below for (at least) the presence of a correctly-compiled module
        - pyarrow.cuda     # [cuda_compiler_version != "None" and not win]
      commands:
        - test ! -f ${SP_DIR}/pyarrow/tests/test_array.py                         # [unix]
        - if exist %SP_DIR%/pyarrow/tests/test_array.py exit 1                    # [win]
        # Need to remove dot from PY_VER; %MYVAR:x=y% replaces "x" in %MYVAR% with "y"
        - if not exist %SP_DIR%/pyarrow/_cuda.cp%PY_VER:.=%-win_amd64.pyd exit 1  # [win and cuda_compiler_version != "None"]

  - name: pyarrow-tests
    script: build-pyarrow.sh  # [not win]
    script: bld-pyarrow.bat   # [win]
    version: {{ version }}
    build:
      string: py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}_{{ build_ext }}
      ignore_run_exports:
        - cudatoolkit
      track_features:
        {{ "- arrow-cuda" if cuda_enabled else "" }}
    requirements:
      build:
        - python                                 # [build_platform != target_platform]
        - cross-python_{{ target_platform }}     # [build_platform != target_platform]
        - cython                                 # [build_platform != target_platform]
        - numpy                                  # [build_platform != target_platform]
        - cmake
        - ninja
        - make  # [unix]
        - {{ compiler('c') }}
        - {{ compiler('cxx') }}
        # pyarrow does not require nvcc but it needs to link against libraries in arrow-cpp=*=*cuda
        - {{ compiler("cuda") }}  # [cuda_compiler_version != "None"]
      host:
        - {{ pin_subpackage('arrow-cpp', exact=True) }}
        - {{ pin_subpackage('pyarrow', exact=True) }}
        - cython
        - numpy
        - python
        - setuptools
        - setuptools_scm
        - six
      run:
        - {{ pin_subpackage('pyarrow', exact=True) }}
        - python
      run_constrained:
        - arrow-cpp-proc * {{ build_ext }}
        - cudatoolkit >=9.2  # [cuda_compiler_version != "None"]

    about:
      home: http://github.com/apache/arrow
      license: Apache-2.0
      license_file:
        - LICENSE.txt
      summary: Python test files for Apache Arrow

    test:
      commands:
        - test -f ${SP_DIR}/pyarrow/tests/test_array.py             # [unix]
        - if not exist %SP_DIR%/pyarrow/tests/test_array.py exit 1  # [win]

about:
  home: http://github.com/apache/arrow
  license: Apache-2.0
  license_file:
    - LICENSE.txt
  summary: C++ and Python libraries for Apache Arrow

extra:
  recipe-maintainers:
    - wesm
    - xhochy
    - leifwalsh
    - jreback
    - cpcloud
    - pcmoritz
    - robertnishihara
    - siddharthteotia
    - kou
    - kszucs
    - pitrou
    - pearu
    - nealrichardson
    - jakirkham