Python.h quirk

Gary E. Miller gem at rellim.com
Sun Sep 22 22:54:21 UTC 2019


Yo Eric!

On Sat, 21 Sep 2019 14:03:28 -0400
"Eric S. Raymond via devel" <devel at ntpsec.org> wrote:

> > It turns out that building ntpc.so had used the Python.h from
> > python2 rather than the one for python3 Downhill from there.
> 
> The problem, of course, is that the Python 2 and Python3 development
> package both want to own Python.h, and the name is not versioned.

Different directories:

kong ~ # find / -xdev -name Python.h
/usr/include/python3.5m/Python.h
/usr/include/python3.7m/Python.h
/usr/include/python2.7/Python.h
/usr/include/python3.6m/Python.h

> I don't see any fix for this other than "have the right dev kit
> installed whebn you build".

On most distros it is more a matter of which Python is the active one.

sys.exec_prefix() tells you where to find the correct Python.h

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20190922/b44d140b/attachment.bin>


More information about the devel mailing list