On 2010-07-09 13:20-0400 Hazen Babcock wrote:

> si...@mungewell.org wrote:
>>> It looks like it is a new feature in Python 3.0 that was backported to
>>> at least some versions of Python 2.6. I have 2.6.2, which does not seem
>>> to have it?
>>
>> Just for the record I have Python 2.6.2 on WinXP which does appear to have
>> this.
>
> Which version of swig do you have? The file that I seem to be missing,
> pybuffer.i, should be in my swigX.X/python folder.
>
>> That said, it's not something which is hugely important and the patch is
>> relatively simple should anyone wish to play with it at a later date.
>
> Apologies, we do appreciate getting this patch. I will add it to svn
> once I figure out how to do this in a way that avoids breaking the build
> for people with older versions of Python and/or swig.

Finding the python version should be straightforward. The last stanza
of cmake/modules/plplot.cmake provides a template for running python
to generate useful information about python.

Modify that template to run, e.g.,

python -c "import sys; print sys.version.split()[0]"

to obtain the version.  I suggest the result should be stored unmodified
(see below) in the PYTHON_VERSION variable.

Note, however, that the version generated this way may have some
trailing non-numeric data you will need to filter out with the cmake
string command before you can make numerical comparisons between say
2.6.0 (when the necessary buffer functionality is first available to
python) and ${PYTHON_VERSION}.  For my (Debian squeeze) system I
obtain, for example, "2.6.5+" from the above command.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to