Skip to content

Commit b756a6e

Browse files
Fixup numpy/pybind11 cross-compile
1 parent 40416d7 commit b756a6e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

vinca/main.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,6 @@ def generate_output(pkg_shortname, vinca_conf, distro, version):
218218
{"sel(build_platform != target_platform)": "python"},
219219
{"sel(build_platform != target_platform)": "cross-python_{{ target_platform }}"},
220220
{"sel(build_platform != target_platform)": "cython"},
221-
{"sel(build_platform != target_platform)": "numpy"},
222-
{"sel(build_platform != target_platform)": "pybind11"},
223221
],
224222
"host": [],
225223
"run": [],
@@ -331,6 +329,16 @@ def generate_output(pkg_shortname, vinca_conf, distro, version):
331329
}
332330
]
333331

332+
# add cross-platform stuff; only do if needed otherwise weird segfaults may occur
333+
if "numpy" in output["requirements"]["host"]:
334+
output["requirements"]["build"] += [
335+
{"sel(build_platform != target_platform)": "numpy"}
336+
]
337+
if "pybind11" in output["requirements"]["host"]:
338+
output["requirements"]["build"] += [
339+
{"sel(build_platform != target_platform)": "pybind11"}
340+
]
341+
334342
# fix up OPENGL support for Unix
335343
if (
336344
"REQUIRE_OPENGL" in output["requirements"]["run"]

0 commit comments

Comments
 (0)