You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jean-Sebastien Delfino <js...@apache.org> on 2006/11/29 18:15:52 UTC

[C++] Path to the Python interpreter and library

Andy,

I made small changes to the Linux scripts that start our Python based 
samples to use the PYTHON_LIB environment variable, if it is defined, to 
find the Python library and interpreter. If you don't have the 
PYTHON_LIB variable defined the behavior is as before, the default 
Python interpreter on the path is used.

I had to do that as my Linux desktop uses a Python older than 2.5 and 
switching to 2.5 breaks the whole desktop. Other Linux users may run 
into this as well so I thought it'd be nicer for the scripts to 
automatically point to the Python interpreter that's used to build as well.

Could you please take a look? feel free to adjust/revert the change if 
it causes any issues... Thanks.

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [C++] Path to the Python interpreter and library

Posted by Andrew Borley <aj...@gmail.com>.
On 11/29/06, Jean-Sebastien Delfino <js...@apache.org> wrote:
> Pete Robbins wrote:
> > On 29/11/06, Jean-Sebastien Delfino <js...@apache.org> wrote:
> >>
> >> Andy,
> >>
> >> I made small changes to the Linux scripts that start our Python based
> >> samples to use the PYTHON_LIB environment variable, if it is defined, to
> >> find the Python library and interpreter. If you don't have the
> >> PYTHON_LIB variable defined the behavior is as before, the default
> >> Python interpreter on the path is used.
> >>
> >> I had to do that as my Linux desktop uses a Python older than 2.5 and
> >> switching to 2.5 breaks the whole desktop. Other Linux users may run
> >> into this as well so I thought it'd be nicer for the scripts to
> >> automatically point to the Python interpreter that's used to build as
> >> well.
> >>
> >> Could you please take a look? feel free to adjust/revert the change if
> >> it causes any issues... Thanks.
> >
> >
> > Just today hit this problem on the Mac! I just linked to the Python
> > 2.5 in
> > /usr/local which seems to be ok. Does your change mean you MUST specify
> > PYTHON_LIB or does it just default to whichever you have installed?
> >
> > Cheers,
> >
> >
> >
> >
> >
>
> It defaults to whichever you have installed if PYTHON_LIB is not
> defined. if PYTHON_LIB is defined then it is just prepended to the path,
> so the specific python interpreter under $PYTHON_LIB/../bin will be used.
>
> --
> Jean-Sebastien
>
>

Hi Sebastien,

No problem with this - I'll try it out on my Linux box tomorrow. BTW -
you don't have to have Python 2.5 - we just have a dependency on the
xml.etree.ElementTree package (for the SDO support) that wasn't
shipped with Python until 2.5. You can get it separately for earlier
versions of Python from
http://effbot.org/zone/element-index.htm (which claims to run on
Python 1.5.2 or later).

Cheers
Andy

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [C++] Path to the Python interpreter and library

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Pete Robbins wrote:
> On 29/11/06, Jean-Sebastien Delfino <js...@apache.org> wrote:
>>
>> Andy,
>>
>> I made small changes to the Linux scripts that start our Python based
>> samples to use the PYTHON_LIB environment variable, if it is defined, to
>> find the Python library and interpreter. If you don't have the
>> PYTHON_LIB variable defined the behavior is as before, the default
>> Python interpreter on the path is used.
>>
>> I had to do that as my Linux desktop uses a Python older than 2.5 and
>> switching to 2.5 breaks the whole desktop. Other Linux users may run
>> into this as well so I thought it'd be nicer for the scripts to
>> automatically point to the Python interpreter that's used to build as
>> well.
>>
>> Could you please take a look? feel free to adjust/revert the change if
>> it causes any issues... Thanks.
>
>
> Just today hit this problem on the Mac! I just linked to the Python 
> 2.5 in
> /usr/local which seems to be ok. Does your change mean you MUST specify
> PYTHON_LIB or does it just default to whichever you have installed?
>
> Cheers,
>
>
>
>
>

It defaults to whichever you have installed if PYTHON_LIB is not 
defined. if PYTHON_LIB is defined then it is just prepended to the path, 
so the specific python interpreter under $PYTHON_LIB/../bin will be used.

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [C++] Path to the Python interpreter and library

Posted by Pete Robbins <ro...@googlemail.com>.
On 29/11/06, Jean-Sebastien Delfino <js...@apache.org> wrote:
>
> Andy,
>
> I made small changes to the Linux scripts that start our Python based
> samples to use the PYTHON_LIB environment variable, if it is defined, to
> find the Python library and interpreter. If you don't have the
> PYTHON_LIB variable defined the behavior is as before, the default
> Python interpreter on the path is used.
>
> I had to do that as my Linux desktop uses a Python older than 2.5 and
> switching to 2.5 breaks the whole desktop. Other Linux users may run
> into this as well so I thought it'd be nicer for the scripts to
> automatically point to the Python interpreter that's used to build as
> well.
>
> Could you please take a look? feel free to adjust/revert the change if
> it causes any issues... Thanks.


Just today hit this problem on the Mac! I just linked to the Python 2.5 in
/usr/local which seems to be ok. Does your change mean you MUST specify
PYTHON_LIB or does it just default to whichever you have installed?

Cheers,





-- 
Pete