Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions recipe/install_shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,23 @@ fi
if [[ ${PY_INTERP_DEBUG} == yes ]]; then
ln -s ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT} ${PREFIX}/lib/libpython${VERABI_NO_DBG}${SHLIB_EXT}
fi

# create libpython3.dylib; linux builds only add this in release mode, do the same on osx
if [[ "$target_platform" == osx-* && ${PY_INTERP_DEBUG} == no ]]; then
# need to filter out windows-specific symbols & PyOS_CheckStack from
# https://github.com/python/cpython/blob/main/Doc/data/stable_abi.dat
awk -F',' '
($1 == "func" || $1 == "data") &&
$4 != "on Windows" &&
$2 != "PyOS_CheckStack" {
print "_" $2
}
' Doc/data/stable_abi.dat > stable_abi_exports.txt

$CC -dynamiclib \
-install_name @rpath/libpython3.dylib \
-compatibility_version 3.0 -current_version ${PY_VER}.0 \
-Wl,-reexport_library,${PREFIX}/lib/libpython${VERABI}.dylib \
-Wl,-exported_symbols_list,stable_abi_exports.txt \
-o ${PREFIX}/lib/libpython3.dylib
fi
7 changes: 3 additions & 4 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% set ver2 = '.'.join(version.split('.')[0:2]) %}
{% set ver2nd = ''.join(version.split('.')[0:2]) %}
{% set ver3nd = ''.join(version.split('.')[0:3]) %}
{% set build_number = 2 %}
{% set build_number = 3 %}

# this makes the linter happy
{% set channel_targets = channel_targets or 'conda-forge main' %}
Expand Down Expand Up @@ -355,9 +355,8 @@ outputs:
{% if py_interp_debug == "yes" %}
- VERABI=${VERABI}d # [not win]
{% endif %}
- test -f ${PREFIX}/lib/libpython${VERABI}.so # [linux]
- test -f ${PREFIX}/lib/libpython3.so # [linux and build_type == "release"]
- test -f ${PREFIX}/lib/libpython${VERABI}.dylib # [osx]
- test -f ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT} # [unix]
- test -f ${PREFIX}/lib/libpython3${SHLIB_EXT} # [unix and build_type == "release"]
{% if freethreading == "yes" %}
- if not exist %PREFIX%\python3t.dll exit 1 # [win]
- if not exist %PREFIX%\python{{ ver2nd }}t.dll exit 1 # [win]
Expand Down