diff --git a/recipe/build_base.sh b/recipe/build_base.sh index 109c003a4..fbb47502f 100644 --- a/recipe/build_base.sh +++ b/recipe/build_base.sh @@ -516,5 +516,24 @@ if [[ "$target_platform" == linux-* ]]; then rm ${PREFIX}/include/uuid.h fi -# See ${RECIPE_DIR}/sitecustomize.py -cp "${RECIPE_DIR}/sitecustomize.py" "${PREFIX}/lib/python${VERABI}/sitecustomize.py" +# 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 +# will have only one digit. noarhc pkgs for freethreading builds are supposed +# to be installed into /lib/python3.13t/site-packages, but conda +# installs them to /lib/python3.13/site-packages. +# The workaround is to add all these wrong paths to sys.path using +# a pth file so that cpython and other tools like pip know about these +# locations to check when importing packages and uninstalling packages. +# When installing packages, pip will use the correct location +# /lib/python3.13t/site-packages. +# Note that these directories are not added to sys.path if they do not exist. +SP_DIR="${PREFIX}/lib/python${PY_VER}${THREAD}/site-packages" +if [[ ${PY_FREETHREADING} == yes ]]; then + echo "${PREFIX}/lib/python${PY_VER}/site-packages" >> $SP_DIR/conda-site.pth +fi +# Workaround for https://github.com/conda/conda/issues/10969 +echo "${PREFIX}/lib/python3.1/site-packages" >> $SP_DIR/conda-site.pth +# A python version independent directory that ABI3 and noarch packages can use. +# This is unused at the moment, but keeping it here for experimentation. +echo "${PREFIX}/lib/python/site-packages" >> $SP_DIR/conda-site.pth diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index b5feefcf3..32efc9889 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -6,5 +6,4 @@ numpy: - 1.26 gil_type: - normal - # Will be enabled as part of https://anaconda.atlassian.net/browse/PKG-5855 - # - disabled # [not (s390x or (osx and x86_64))] + - disabled # [not s390x] diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d24882ca4..e2d214a33 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -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 = 0 %} +{% set build_number = 1 %} {% set channel_targets = ('abc', 'def') %} # this is just for the initial build, to break dependencies with python -> pip -> libpython-static {% set bootstrap = "false" %}