Skip to content

Commit

Permalink
Fix testing compopts for old python versions (chapel-lang#26351)
Browse files Browse the repository at this point in the history
Fixes the compopts specified for a Python test to handle older Python
versions.

[Reviewed by @ShreyasKhandekar]
  • Loading branch information
jabraham17 authored Dec 4, 2024
2 parents a93dfa4 + 6dadbd8 commit 4c1ffc0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/library/packages/Python/COMPOPTS
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ PYTHON_INCLUDE_DIR=$($chpl_python -c "import sysconfig; print(sysconfig.get_path
PYTHON_LIB_DIR=$($chpl_python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
PYTHON_LDVERSION=$($chpl_python -c "import sysconfig; print(sysconfig.get_config_var('LDVERSION'))")

echo "--ccflags -isystem$PYTHON_INCLUDE_DIR -L$PYTHON_LIB_DIR --ldflags -Wl,-rpath,$PYTHON_LIB_DIR -lpython$PYTHON_LDVERSION"
DISABLE_WARNINGS=""
# some older python's don't use `#ifndef` when they should
# so we disable redefintion warnings for clean testing
DISABLE_WARNINGS+="--ccflags -Wno-macro-redefined"

echo "--ccflags -isystem$PYTHON_INCLUDE_DIR -L$PYTHON_LIB_DIR --ldflags -Wl,-rpath,$PYTHON_LIB_DIR -lpython$PYTHON_LDVERSION $DISABLE_WARNINGS"

0 comments on commit 4c1ffc0

Please sign in to comment.