[New-bugs-announce] [issue38620] Shell python-config --includes returns the same path twice

STINNER Victor report at bugs.python.org
Mon Oct 28 12:17:26 EDT 2019


New submission from STINNER Victor <vstinner at python.org>:

When the shell script implementation of python-config was introduced, $PLATINCDIR variable was added:

commit 874211978c8097b8e747c90fa3ff41aacabe340f
Author: doko at python.org <doko at python.org>
Date:   Sat Jan 26 11:39:31 2013 +0100

    - Issue #16235: Implement python-config as a shell script.

...
+INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}"
+PLATINCDIR="-I$includedir/python${VERSION}${ABIFLAGS}"
...
+        --includes)
+            echo "$INCDIR $PLATINCDIR"
+        ;;
+        --cflags)
+            echo "$INCDIR $PLATINCDIR $BASECFLAGS $CFLAGS $OPT"
+        ;;
...

But this variable is always equal to $INCDIR: it doesn't seem possible to change its value.

What is the purpose of emitting the same path twice?

Example on Fedora 30:

$ file /usr/bin/python3.8-x86_64-config 
/usr/bin/python3.8-x86_64-config: a /usr/bin/sh script, ..

$ /usr/bin/python3.8-x86_64-config --includes
-I/usr/include/python3.8 -I/usr/include/python3.8

=> /usr/include/python3.8 is giving twice

----------
components: Build
messages: 355561
nosy: doko, vstinner
priority: normal
severity: normal
status: open
title: Shell python-config --includes returns the same path twice
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38620>
_______________________________________


More information about the New-bugs-announce mailing list