Skip to content

Commit c237464

Browse files
committed
Use sysconfigdata from shared library build
Use the sysconfigdata from the shared library build rather than the static one. The main difference is that this ensures that programs link to the shared Python library rather than the static library. Other differences are mostly superficial (build directories, test invocation commands). Fixes #565 Signed-off-by: Michał Górny <mgorny@quansight.com>
1 parent c223c6e commit c237464

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

recipe/build_base.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,9 @@ if [[ ${target_platform} =~ .*linux.* ]]; then
395395
ln -sf ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT}.1.0 ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT}
396396
fi
397397

398-
SYSCONFIG=$(find ${_buildd_static}/$(cat ${_buildd_static}/pybuilddir.txt) -name "_sysconfigdata*.py" -print0)
398+
# Use sysconfigdata from shared build, as we want packages to prefer linking against the shared library.
399+
# Issue #565.
400+
SYSCONFIG=$(find ${_buildd_shared}/$(cat ${_buildd_shared}/pybuilddir.txt) -name "_sysconfigdata*.py" -print0)
399401
cat ${SYSCONFIG} | ${SYS_PYTHON} "${RECIPE_DIR}"/replace-word-pairs.py \
400402
"${_FLAGS_REPLACE[@]}" \
401403
> ${PREFIX}/lib/python${VERABI_NO_DBG}/$(basename ${SYSCONFIG})

recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{% set ver2 = '.'.join(version.split('.')[0:2]) %}
55
{% set ver2nd = ''.join(version.split('.')[0:2]) %}
66
{% set ver3nd = ''.join(version.split('.')[0:3]) %}
7-
{% set build_number = 0 %}
7+
{% set build_number = 1 %}
88

99
# this makes the linter happy
1010
{% set channel_targets = channel_targets or 'conda-forge main' %}

0 commit comments

Comments
 (0)