diff --git a/recipe/build_base.sh b/recipe/build_base.sh index dd5c1555..ec75b5fc 100644 --- a/recipe/build_base.sh +++ b/recipe/build_base.sh @@ -525,6 +525,17 @@ if [[ "$target_platform" == linux-* ]]; then rm ${PREFIX}/include/uuid.h fi +if [[ "$target_platform" == osx-* ]]; then + awk -F',' '$1 == "func" || $1 == "data" { 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 + # Workaround for https://github.com/conda/conda/issues/14053 # Older conda versions install noarch: python packages in wrong places. # For example python3.1 because older conda assumed python minor version diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 793e4219..cf2bb96e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -246,6 +246,7 @@ outputs: - for f in ${CONDA_PREFIX}/lib/python*/_sysconfig*.py; do echo "Checking $f:"; if [[ `rg @[^@]*@ $f` ]]; then echo "FAILED ON $f"; cat $f; exit 1; fi; done # [linux64 or osx] - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.a # [unix] - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.nolto.a # [unix] + - test -f ${PREFIX}/lib/libpython3${SHLIB_EXT} # [unix] {% if freethreading == "yes" %} - if not exist %PREFIX%\\libs\\python3t.lib exit 1 # [win] - if not exist %PREFIX%\\libs\\python{{ ver2nd }}t.lib exit 1 # [win]