-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
meta.yaml
316 lines (288 loc) · 12.8 KB
/
meta.yaml
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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
{% set version = "1.86.0" %}
{% set boost_libs = [
"atomic", "charconv", "chrono", "cobalt", "container", "context", "contract", "coroutine",
"date_time", "filesystem", "graph", "iostreams", "locale", "log", "log_setup",
"math_c99", "math_c99f", "math_tr1", "math_tr1f", "prg_exec_monitor",
"program_options", "random", "regex", "serialization", "system", "thread",
"timer", "type_erasure", "unit_test_framework", "wave", "wserialization"
] %}
{% set boost_libs = boost_libs + ["math_c99l", "math_tr1l"] %} # [not ppc64le]
{% set boost_libs_static_only = ["exception", "test_exec_monitor"] %}
{% set boost_libs_py = ["python%s" % py, "numpy%s" % py] %}
# we only need _a_ python version to build the headers for libboost-headers,
# make it accessible in the build scripts via build/script_env below.
{% set PY_DUMMY_VER = "3.10" %}
{% set NP_DUMMY_VER = "2.0" %}
package:
name: boost-split
version: {{ version }}
source:
url: https://boostorg.jfrog.io/artifactory/main/release/{{ version }}/source/boost_{{ version|replace(".", "_") }}.tar.bz2
sha256: 1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b
patches:
# ensure our compiler flags get used during bootstrapping
- patches/0001-Add-default-value-for-cxx-and-cxxflags-options-for-t.patch
# still haven't landed in main boost repo yet: https://github.com/boostorg/python/issues/446
# backport https://github.com/boostorg/python/pull/432
- patches/0002-Support-numpy-2.0.0b1.patch
# backport https://github.com/boostorg/python/pull/443
- patches/0003-Support-numpy-2.0.patch
build:
number: 2
script_env:
- PY_DUMMY_VER={{ PY_DUMMY_VER }}
- NP_DUMMY_VER={{ NP_DUMMY_VER }}
requirements:
build:
- {{ compiler('cxx') }}
- {{ stdlib('c') }}
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- python {{ PY_DUMMY_VER }}.* *_cpython # [build_platform != target_platform]
- numpy {{ NP_DUMMY_VER }}.* # [build_platform != target_platform]
- ruby *
host:
- icu # [unix]
- xz # [unix]
- bzip2
- zlib
- zstd
# see above
- python {{ PY_DUMMY_VER }}.* *_cpython
- numpy {{ NP_DUMMY_VER }}.*
outputs:
- name: libboost-headers
script: install-lib.sh # [unix]
script: install-lib.bat # [win]
requirements:
# dummy build env to avoid EnvironmentLocationNotFound on win
build: # [win]
- cmake # [win]
host:
run_constrained:
# avoid co-installation with old naming of package
- boost-cpp <0.0a0
test:
commands:
# presence of regular headers
- test -d $PREFIX/include/boost # [unix]
- if not exist %LIBRARY_INC%\boost exit 1 # [win]
# presence of python headers (not dependent on python version)
- test -f $PREFIX/include/boost/python.hpp # [unix]
- test -f $PREFIX/include/boost/python/tuple.hpp # [unix]
- if not exist %LIBRARY_INC%\boost\python.hpp exit 1 # [win]
- if not exist %LIBRARY_INC%\boost\python\tuple.hpp exit 1 # [win]
# absence of general CMake metadata
- test ! -d $PREFIX/lib/cmake/Boost-{{ version }} # [unix]
- if exist %LIBRARY_LIB%\cmake\Boost-{{ version }} exit 1 # [win]
# absence of all libraries (shared & static) + CMake metadata
{% for each_lib in boost_libs + boost_libs_static_only + boost_libs_py %}
- test ! -f $PREFIX/lib/libboost_{{ each_lib }}.so # [linux]
- test ! -f $PREFIX/lib/libboost_{{ each_lib }}.dylib # [osx]
- test ! -f $PREFIX/lib/libboost_{{ each_lib }}.a # [unix]
- if exist %LIBRARY_BIN%\boost_{{ each_lib }}.dll exit 1 # [win]
- if exist %LIBRARY_LIB%\boost_{{ each_lib }}.lib exit 1 # [win]
- if exist %LIBRARY_LIB%\libboost_{{ each_lib }}.lib exit 1 # [win]
- test ! -d $PREFIX/lib/cmake/boost_{{ each_lib }}-{{ version }} # [unix]
- if exist %LIBRARY_LIB%\cmake\boost_{{ each_lib }}-{{ version }} exit 1 # [win]
{% endfor %}
# libraries without the headers (for run-export)
- name: libboost
script: install-lib.sh # [unix]
script: install-lib.bat # [win]
requirements:
build:
# for strong run-exports
- {{ compiler('cxx') }}
- {{ stdlib('c') }}
host:
- icu # [unix]
- libiconv # [win]
- bzip2
- xz
- zlib
- zstd
run_constrained:
# avoid co-installation with old naming of package
- boost-cpp <0.0a0
test:
commands:
# absence of headers
- test ! -d $PREFIX/include/boost # [unix]
- if exist %LIBRARY_INC%\boost exit 1 # [win]
# absence of general CMake metadata
- test ! -d $PREFIX/lib/cmake/Boost-{{ version }} # [unix]
- if exist %LIBRARY_LIB%\cmake\Boost-{{ version }} exit 1 # [win]
# library artefacts
{% for each_lib in boost_libs + boost_libs_static_only + boost_libs_py %}
# shared libraries
{% if each_lib in boost_libs %}
# default case: present
- test -f $PREFIX/lib/libboost_{{ each_lib }}.so # [linux]
- test -f $PREFIX/lib/libboost_{{ each_lib }}.dylib # [osx]
- if not exist %LIBRARY_BIN%\boost_{{ each_lib }}.dll exit 1 # [win]
- if not exist %LIBRARY_LIB%\boost_{{ each_lib }}.lib exit 1 # [win]
{% else %}
# absent for libs that are static-only & the python ones
- test ! -f $PREFIX/lib/libboost_{{ each_lib }}.so # [linux]
- test ! -f $PREFIX/lib/libboost_{{ each_lib }}.dylib # [osx]
- if exist %LIBRARY_BIN%\boost_{{ each_lib }}.dll exit 1 # [win]
- if exist %LIBRARY_LIB%\boost_{{ each_lib }}.lib exit 1 # [win]
{% endif %}
# static libraries
{% if each_lib in boost_libs_static_only %}
# present for those that are marked static-only above
- test -f $PREFIX/lib/libboost_{{ each_lib }}.a # [unix]
- if not exist %LIBRARY_LIB%\libboost_{{ each_lib }}.lib exit 1 # [win]
{% else %}
# absent for default libs & the python ones
- test ! -f $PREFIX/lib/libboost_{{ each_lib }}.a # [unix]
- if exist %LIBRARY_LIB%\libboost_{{ each_lib }}.lib exit 1 # [win]
{% endif %}
# absence of CMake metadata
- test ! -d $PREFIX/lib/cmake/boost_{{ each_lib }}-{{ version }} # [unix]
- if exist %LIBRARY_LIB%\cmake\boost_{{ each_lib }}-{{ version }} exit 1 # [win]
{% endfor %}
# libboost headers + libs + metadata
- name: libboost-devel
script: install-lib.sh # [unix]
script: install-lib.bat # [win]
build:
run_exports:
# run-export the output without the headers
- {{ pin_subpackage("libboost", max_pin="x.x") }}
requirements:
host:
- {{ pin_subpackage("libboost", exact=True) }}
- {{ pin_subpackage("libboost-headers", exact=True) }}
run:
- {{ pin_subpackage("libboost", exact=True) }}
- {{ pin_subpackage("libboost-headers", exact=True) }}
run_constrained:
# avoid co-installation with old naming of package
- boost-cpp <0.0a0
test:
files:
- test
- test_lib.sh
- test_lib.bat
requires:
- {{ compiler('cxx') }} # [build_platform == target_platform]
commands:
# presence of general CMake metadata
- test -d $PREFIX/lib/cmake/Boost-{{ version }} # [unix]
- if not exist %LIBRARY_LIB%\cmake\Boost-{{ version }} exit 1 # [win]
{% for each_lib in boost_libs + boost_libs_static_only %}
# presence of CMake metadata for regular libs
- test -d $PREFIX/lib/cmake/boost_{{ each_lib }}-{{ version }} # [unix]
- if not exist %LIBRARY_LIB%\cmake\boost_{{ each_lib }}-{{ version }} exit 1 # [win]
{% endfor %}
# absence of CMake metadata that belongs to libboost-python(-devel)
- test ! -d $PREFIX/lib/cmake/boost_python-{{ version }} # [unix]
- test ! -d $PREFIX/lib/cmake/boost_numpy-{{ version }} # [unix]
- if exist %LIBRARY_LIB%\cmake\boost_python-{{ version }} exit 1 # [win]
- if exist %LIBRARY_LIB%\cmake\boost_numpy-{{ version }} exit 1 # [win]
# test compilation
- ./test_lib.sh # [unix]
- ./test_lib.bat # [win]
# the python libraries (no headers)
- name: libboost-python
script: build-py.sh # [unix]
script: build-py.bat # [win]
requirements:
build:
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- numpy # [build_platform != target_platform]
- {{ compiler('cxx') }}
- {{ stdlib('c') }}
host:
# ensure python_impl gets picked up by smithy (by using it as a selector) and therefore
# populated in the .ci_config/*.yaml files, for use in {build,install}-py.{sh,bat}.
- python # [python_impl == "cpython"]
- python # [python_impl == "pypy"]
- numpy
# keep this in host to ensure that the environment content snapshot before/after
# installation doesn't consider the headers or CMake metadata part of this output
- {{ pin_subpackage("libboost-devel", exact=True) }}
run:
- python
run_constrained:
# avoid co-installation with old naming of package
- boost <0.0a0
# avoid co-installation with Anaconda's naming of this output
- py-boost <0.0a0
test:
commands:
# absence of headers
- test ! -d $PREFIX/include/boost # [unix]
- if exist %LIBRARY_INC%\boost exit 1 # [win]
# Verify libraries.
{% for each_lib in boost_libs_py %}
# presence of shared libs
- test -f $PREFIX/lib/libboost_{{ each_lib }}.so # [linux]
- test -f $PREFIX/lib/libboost_{{ each_lib }}.dylib # [osx]
- if not exist %LIBRARY_BIN%\boost_{{ each_lib }}.dll exit 1 # [win]
- if not exist %LIBRARY_LIB%\boost_{{ each_lib }}.lib exit 1 # [win]
# absence of static libs
- test ! -f $PREFIX/lib/libboost_{{ each_lib }}.a # [unix]
- if exist %LIBRARY_LIB%\libboost_{{ each_lib }}.lib exit 1 # [win]
{% endfor %}
# absence of CMake metadata
- test ! -d $PREFIX/lib/cmake/boost_python-{{ version }} # [unix]
- test ! -d $PREFIX/lib/cmake/boost_numpy-{{ version }} # [unix]
- if exist %LIBRARY_LIB%\cmake\boost_python-{{ version }} exit 1 # [win]
- if exist %LIBRARY_LIB%\cmake\boost_numpy-{{ version }} exit 1 # [win]
# python libs w/ headers
- name: libboost-python-devel
script: install-py.sh # [unix]
script: install-py.bat # [win]
build:
run_exports:
# run-export the output without the headers
- {{ pin_subpackage("libboost-python", max_pin="x.x") }}
requirements:
# dummy build env to avoid EnvironmentLocationNotFound on win
build: # [win]
- cmake # [win]
host:
- python
- numpy
# as for libboost-python
- {{ pin_subpackage("libboost-devel", exact=True) }}
run:
- python
- {{ pin_subpackage("libboost-python", exact=True) }}
- {{ pin_subpackage("libboost-devel", exact=True) }}
run_constrained:
# avoid co-installation with old naming of package
- boost <0.0a0
# avoid co-installation with Anaconda's naming of this output
- py-boost <0.0a0
test:
commands:
# presence of CMake metadata
- test -d $PREFIX/lib/cmake/boost_python-{{ version }} # [unix]
- test -d $PREFIX/lib/cmake/boost_numpy-{{ version }} # [unix]
- if not exist %LIBRARY_LIB%\cmake\boost_python-{{ version }} exit 1 # [win]
- if not exist %LIBRARY_LIB%\cmake\boost_numpy-{{ version }} exit 1 # [win]
about:
home: http://www.boost.org/
license: BSL-1.0
license_file: LICENSE_1_0.txt
summary: Free peer-reviewed portable C++ source libraries.
dev_url: https://github.com/boostorg/boost
doc_url: https://www.boost.org/doc/
extra:
recipe-maintainers:
- ccordoba12
- jakirkham
- msarahan
- ocefpaf
- jschueller
- scopatz
- isuruf
- xhochy
- beckermr
- matthiasdiener
- h-vetinari
feedstock-name: boost