diff --git a/recipe/build_base.sh b/recipe/build_base.sh index 52fa8c3e..b2666146 100644 --- a/recipe/build_base.sh +++ b/recipe/build_base.sh @@ -81,7 +81,7 @@ test "${PY_VER}" = "${VER}" unset _PYTHON_SYSCONFIGDATA_NAME unset _CONDA_PYTHON_SYSCONFIGDATA_NAME -# Prevent lib/python${VER}/_sysconfigdata_*.py from ending up with full paths to these things +# Prevent lib/python${VERABI}/_sysconfigdata_*.py from ending up with full paths to these things # in _build_env because _build_env will not get found during prefix replacement, only _h_env_placeh ... AR=$(basename "${AR}") @@ -385,15 +385,15 @@ fi SYSCONFIG=$(find ${_buildd_static}/$(cat ${_buildd_static}/pybuilddir.txt) -name "_sysconfigdata*.py" -print0) cat ${SYSCONFIG} | ${SYS_PYTHON} "${RECIPE_DIR}"/replace-word-pairs.py \ "${_FLAGS_REPLACE[@]}" \ - > ${PREFIX}/lib/python${VER}/$(basename ${SYSCONFIG}) -MAKEFILE=$(find ${PREFIX}/lib/python${VER}/ -path "*config-*/Makefile" -print0) + > ${PREFIX}/lib/python${VERABI}/$(basename ${SYSCONFIG}) +MAKEFILE=$(find ${PREFIX}/lib/python${VERABI}/ -path "*config-*/Makefile" -print0) cp ${MAKEFILE} /tmp/Makefile-$$ cat /tmp/Makefile-$$ | ${SYS_PYTHON} "${RECIPE_DIR}"/replace-word-pairs.py \ "${_FLAGS_REPLACE[@]}" \ > ${MAKEFILE} # Check to see that our differences took. -# echo diff -urN ${SYSCONFIG} ${PREFIX}/lib/python${VER}/$(basename ${SYSCONFIG}) -# diff -urN ${SYSCONFIG} ${PREFIX}/lib/python${VER}/$(basename ${SYSCONFIG}) +# echo diff -urN ${SYSCONFIG} ${PREFIX}/lib/python${VERABI}/$(basename ${SYSCONFIG}) +# diff -urN ${SYSCONFIG} ${PREFIX}/lib/python${VERABI}/$(basename ${SYSCONFIG}) # Python installs python${VER}m and python${VER}, one as a hardlink to the other. conda-build breaks these # by copying. Since the executable may be static it may be very large so change one to be a symlink @@ -410,7 +410,7 @@ ln -s ${PREFIX}/bin/python3.13 ${PREFIX}/bin/python3.1 # Remove test data to save space # Though keep `support` as some things use that. # TODO :: Make a subpackage for this once we implement multi-level testing. -pushd ${PREFIX}/lib/python${VER} +pushd ${PREFIX}/lib/python${VERABI} mkdir test_keep mv test/__init__.py test/support test/test_support* test/test_script_helper* test_keep/ rm -rf test */test @@ -423,7 +423,7 @@ pushd ${PREFIX} chmod +w lib/libpython${VERABI}.a ${STRIP} -S lib/libpython${VERABI}.a fi - CONFIG_LIBPYTHON=$(find lib/python${VER}/config-${VERABI}* -name "libpython${VERABI}.a") + CONFIG_LIBPYTHON=$(find lib/python${VERABI}/config-${VERABI}* -name "libpython${VERABI}.a") if [[ -f lib/libpython${VERABI}.a ]] && [[ -f ${CONFIG_LIBPYTHON} ]]; then chmod +w ${CONFIG_LIBPYTHON} rm ${CONFIG_LIBPYTHON} @@ -449,7 +449,7 @@ esac # Copy sysconfig that gets recorded to a non-default name # using the new compilers with python will require setting _PYTHON_SYSCONFIGDATA_NAME # to the name of this file (minus the .py extension) -pushd "${PREFIX}"/lib/python${VER} +pushd "${PREFIX}"/lib/python${VERABI} # On Python 3.5 _sysconfigdata.py was getting copied in here and compiled for some reason. # This breaks our attempt to find the right one as recorded_name. find lib-dynload -name "_sysconfigdata*.py*" -exec rm {} \; @@ -524,4 +524,4 @@ fi # Workaround for old conda versions which fail to install noarch packages for Python 3.10+ # https://github.com/conda/conda/issues/10969 -ln -s "${PREFIX}/lib/python3.13" "${PREFIX}/lib/python3.1" +ln -s "${PREFIX}/lib/python${VERABI}" "${PREFIX}/lib/python3.1" diff --git a/recipe/build_static.sh b/recipe/build_static.sh index 884cd2f3..9b5f3908 100644 --- a/recipe/build_static.sh +++ b/recipe/build_static.sh @@ -35,9 +35,9 @@ esac cp -pf ${_buildd_static}/libpython${VERABI}.a ${PREFIX}/lib/libpython${VERABI}.a if [[ ${HOST} =~ .*linux.* ]]; then - pushd ${PREFIX}/lib/python${VER}/config-${VERABI}-${OLD_HOST} + pushd ${PREFIX}/lib/python${VERABI}/config-${VERABI}-${OLD_HOST} elif [[ ${HOST} =~ .*darwin.* ]]; then - pushd ${PREFIX}/lib/python${VER}/config-${VERABI}-darwin + pushd ${PREFIX}/lib/python${VERABI}/config-${VERABI}-darwin fi ln -s ../../libpython${VERABI}.a libpython${VERABI}.a popd diff --git a/recipe/meta.yaml b/recipe/meta.yaml index aa4bcc8c..bba06e79 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -331,7 +331,7 @@ outputs: - pushd prefix-replacement # [unix] - test -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}{{ gil_abi }}.a # [unix] - test -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}{{ gil_abi }}.nolto.a # [unix] - - test -f ${PREFIX}/lib/python${PKG_VERSION%.*}/config-${PKG_VERSION%.*}{{ gil_abi }}-darwin/libpython${PKG_VERSION%.*}{{ gil_abi }}.a # [osx] + - test -f ${PREFIX}/lib/python${PKG_VERSION%.*}{{ gil_abi }}/config-${PKG_VERSION%.*}{{ gil_abi }}-darwin/libpython${PKG_VERSION%.*}{{ gil_abi }}.a # [osx] - bash build-and-test.sh # [unix] - popd # [unix] - popd # [unix]