Skip to content

Commit da6390c

Browse files
authored
Merge pull request #795 from h-vetinari/sysconfig
remove old_host naming for _sysconfigdata_*
2 parents 63aed14 + 759a3c7 commit da6390c

File tree

2 files changed

+4
-28
lines changed

2 files changed

+4
-28
lines changed

recipe/build_base.sh

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -438,22 +438,6 @@ pushd ${PREFIX}
438438
fi
439439
popd
440440

441-
# OLD_HOST is with CentOS version in them. When building this recipe
442-
# with the compilers from conda-forge OLD_HOST != HOST, but when building
443-
# with the compilers from defaults OLD_HOST == HOST. Both cases are handled in the
444-
# code below
445-
case "$target_platform" in
446-
linux-64)
447-
OLD_HOST=$(echo ${HOST} | sed -e 's/-conda-/-conda_cos6-/g')
448-
;;
449-
linux-*)
450-
OLD_HOST=$(echo ${HOST} | sed -e 's/-conda-/-conda_cos7-/g')
451-
;;
452-
*)
453-
OLD_HOST=$HOST
454-
;;
455-
esac
456-
457441
# Copy sysconfig that gets recorded to a non-default name
458442
# using the new compilers with python will require setting _PYTHON_SYSCONFIGDATA_NAME
459443
# to the name of this file (minus the .py extension)
@@ -484,13 +468,9 @@ pushd "${PREFIX}"/lib/python${VERABI_NO_DBG}
484468
sed -i.bak "s/'GNULD': 'yes'/'GNULD': 'no'/g" sysconfigfile
485469
cp sysconfigfile ${our_compilers_name}
486470

487-
sed -i.bak "s@${HOST}@${OLD_HOST}@g" sysconfigfile
488-
old_compiler_name=_sysconfigdata_$(echo ${OLD_HOST} | sed -e 's/[.-]/_/g').py
489-
cp sysconfigfile ${old_compiler_name}
490-
491471
# For system gcc remove the triple
492-
sed -i.bak "s@$OLD_HOST-c++@g++@g" sysconfigfile
493-
sed -i.bak "s@$OLD_HOST-@@g" sysconfigfile
472+
sed -i.bak "s@$HOST-c++@g++@g" sysconfigfile
473+
sed -i.bak "s@$HOST-@@g" sysconfigfile
494474
if [[ "$target_platform" == linux* ]]; then
495475
# For linux, make sure the system gcc uses our linker
496476
sed -i.bak "s@-pthread@-pthread -B $PREFIX/share/python_compiler_compat@g" sysconfigfile

recipe/meta.yaml

Lines changed: 2 additions & 6 deletions
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' %}
@@ -197,11 +197,7 @@ outputs:
197197
- python_abi {{ ver2 }}.* *_{{ abi_tag }}
198198
test:
199199
downstreams:
200-
{% if freethreading == "yes" %}
201-
- cython >=3.1.0.a0
202-
{% else %}
203200
- cython
204-
{% endif %}
205201
- setuptools
206202
requires:
207203
- ripgrep
@@ -236,7 +232,7 @@ outputs:
236232
- test-venv\\Scripts\\python.exe -c "import ctypes" # [win]
237233
- test-venv/bin/python -c "import ctypes" # [unix]
238234
- python -c "import sysconfig; print(sysconfig.get_config_var('CC'))" # [not win]
239-
- _CONDA_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_x86_64_conda_cos6_linux_gnu python -c "import sysconfig; print(sysconfig.get_config_var('CC'))" # [linux64]
235+
- _CONDA_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_x86_64_conda_linux_gnu python -c "import sysconfig; print(sysconfig.get_config_var('CC'))" # [linux64]
240236
# check for unreplaced @ symbols in sysconfig files, excluding e.g. '"$@".lto'
241237
- 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]
242238
- test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.a # [unix]

0 commit comments

Comments
 (0)