[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to use python macros together

From: Warren Young
Subject: Re: how to use python macros together
Date: Mon, 6 Apr 2015 08:51:19 -0600

On Apr 3, 2015, at 11:55 AM, Andy Falanga (afalanga) <address@hidden> wrote:
> It just so happens that, on CentOS 6, the install of python is broken because 
> one cannot do pkg-config --cflags python.

Who said you should be able to?

I just downloaded the source tarballs for Python 2.6.6 (which is what CentOS 6 
ships) and the latest 2.7 release, which happens to be 2.7.9, and lo and 
behold, appeared sometime in the 2.7 series.

Thus, your command doesn’t work for Python 2.6.6 on *any* platform, unless the 
packager slipped in a custom version.

> So, to work around this, I did the following in
> if test -d /usr/lib/python2.6 ; then
> #   AC_PREFIX_DEFAULT([/usr/lib/python2.6])
>   PYTHON_CPPFLAGS=-I/usr/include/python2.6
>   PYTHON_LIB=-lpython2.6
> fi

It’s always a bad idea to hard-code versions and paths.  It works until it 

Instead, call python-config --cflags.

Incidentally, isn’t this an autoconf issue, rather than an automake one?  I get 
that you’re going to be making use of CFLAGS and such in your 
files, but the problem is cropping up before you get to that stage.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]