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

2021-09-21 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-10-29 Thread Matthias Klose


Matthias Klose  added the comment:

Some distros have two include directories in the path,

 /usr/include
 /usr/include/

The latter for architecture specific files, so on these distributions the 
python config file is installed there.  Then you'll need to have both include 
directories.  Unfortunately most third party only expect one, and because the 
config file is installed in a subdir, then fail to build.

So the solution is to provide a rather arch specific ugly wrapper file to get 
away with one include directory.

https://salsa.debian.org/cpython-team/python3/blob/master/debian/multiarch.h.in

Also done on other distros like
https://src.fedoraproject.org/rpms/gmp/blob/master/f/gmp.h

I still think the two directories should be emitted, maybe check in the script 
if they are different.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-10-29 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy: +hroncok

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-10-28 Thread STINNER Victor


New submission from STINNER Victor :

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

commit 874211978c8097b8e747c90fa3ff41aacabe340f
Author: d...@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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com