Skip to content

Commit

Permalink
fix compopts for old python
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Abraham <[email protected]>
  • Loading branch information
jabraham17 committed Dec 3, 2024
1 parent b442d78 commit 6dadbd8
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 6dadbd8

Please sign in to comment.