Re: [matplotlib-devel] building from SVN on Mac OS X 10.5

2009-08-21 Thread Eric Bruning
Hi Jouni,

Your changes helped, but I'm still seeing build errors against recent svn.

On Thu, Aug 20, 2009 at 12:33 PM, Jouni K. Seppänen wrote:
> Eric Bruning  writes:
>
>> 2. The official recommendation at
>> http://matplotlib.sourceforge.net/users/installing.html#build-osx
>> doesn't work because OS X doesn't ship with wget and because the
>> download URLs for zlib, libpng, and freetype are broken in
>> matplotlib/release/osx
>
> I changed it to use curl, which OS X does have. Does this help?

I cleaned out my build and tried again, following the instructions in
release/osx/README.txt

>From a current svn checkout, I successfully ran
python setup.py sdist
mv dist/matplotlib-1.0.svn.tar.gz release/osx/

Updated version numbers to:

PYVERSION=2.6
PYTHON=python${PYVERSION}
SRCDIR=${PWD}
ZLIBVERSION=1.2.3
PNGVERSION=1.2.39
FREETYPEVERSION=2.3.9
MPLVERSION=1.0.svn
BDISTMPKGVERSION=0.4.4
MPLSRC=matplotlib-${MPLVERSION}
MACOSX_DEPLOYMENT_TARGET=10.4

The revised curl commands worked. (I had to grab zlib manually since
zlib.net is down this morning!), and all the dependencies built with
no problems.

make installers fails with:
...
g++ -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
-bundle -undefined dynamic_lookup -arch ppc -arch i386
-L/Users/ebruning/sources/matplotlib/release/osx/zlib-1.2.3
-L/Users/ebruning/sources/matplotlib/release/osx/libpng-1.2.39
-L/Users/ebruning/sources/matplotlib/release/osx/freetype-2.3.9 -Os
-arch ppc -arch i386
-I/Users/ebruning/sources/matplotlib/release/osx/zlib-1.2.3
-I/Users/ebruning/sources/matplotlib/release/osx/libpng-1.2.39
-I/Users/ebruning/sources/matplotlib/release/osx/freetype-2.3.9/include
build/temp.macosx-10.3-fat-2.6/src/ft2font.o
build/temp.macosx-10.3-fat-2.6/src/mplutils.o
build/temp.macosx-10.3-fat-2.6/CXX/cxx_extensions.o
build/temp.macosx-10.3-fat-2.6/CXX/cxxsupport.o
build/temp.macosx-10.3-fat-2.6/CXX/IndirectPythonInterface.o
build/temp.macosx-10.3-fat-2.6/CXX/cxxextensions.o -L/usr/local/lib
-L/usr/local/lib -L/usr/lib -lfreetype -lz -lstdc++ -lm -o
build/lib.macosx-10.3-fat-2.6/matplotlib/ft2font.so
ld warning: in 
/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.10.4.dylib,
missing required architecture ppc in file
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.1.dylib,
missing required architecture ppc in file for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file:
/var/folders/RP/RPE-UjrSHZ4SQq6AJQBxqk+++TI/-Tmp-//ccAHjtZk.out (No
such file or directory)
error: command 'g++' failed with exit status 1
make: *** [installers] Error 1

Thanks,
Eric



>
> --
> Jouni K. Seppänen
> http://www.iki.fi/jks
>
>
> --
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] building from SVN on Mac OS X 10.5

2009-08-21 Thread Jouni K . Seppänen
Eric Bruning  writes:

> ld warning: in 
> /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.10.4.dylib,
> missing required architecture ppc in file
> ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.1.dylib,
> missing required architecture ppc in file for architecture ppc

Somehow your gcc is picking up libraries from /usr/local/lib, where you
have presumably installed an x86-only version of gcc (could be a side
effect of installing GNU Fortran). I don't know how to prevent that,
except perhaps by moving /usr/local away for the duration of the
compilation command, e.g.

sudo mv /usr/local /usr/local.renamed
make installers
sudo mv /usr/local.renamed /usr/local

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] building from SVN on Mac OS X 10.5

2009-08-21 Thread Ludwig Schwardt
Hi,

Just my $0.10 on this topic: Stick with the default system Python
2.5.1 on Leopard and save yourself a lot of potential hassle.

In the days of Tiger and its antiquated and hamstrung Python 2.3, many
people were forced to install Python themselves just to get going.
They had to choose between several alternatives: MacPython,
Enthought's EPD, ActiveState Python, etc. This notion of installing
Python on Mac OS X persists to this day, and many people still assume
it is necessary.

If you really want the latest Python or the convenience of a
pre-packaged distribution, go ahead and install one of the fine Mac
Pythons out there. On the other hand, if you just want to get
matplotlib going, the system Python will do just fine. In my
experience it saves you many hassles with CPU architectures during
builds (which has gotten worse under Leopard). I successfully built
and ran the latest MPL r7514 by simply typing "python setup.py build".
No environment variables to be set...

On an aside, Snow Leopard (Mac OS 10.6) looks to have a whole range of
Pythons, from 2.5 all the way up to 3.1. This could make the default
system Python even more of a no-brainer.

Regards,
Ludwig

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] building from SVN on Mac OS X 10.5

2009-08-21 Thread John Hunter
On Fri, Aug 21, 2009 at 10:41 AM, Jouni K. Seppänen wrote:
> Eric Bruning  writes:
>
>> ld warning: in 
>> /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.10.4.dylib,
>> missing required architecture ppc in file
>> ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.1.dylib,
>> missing required architecture ppc in file for architecture ppc
>
> Somehow your gcc is picking up libraries from /usr/local/lib, where you
> have presumably installed an x86-only version of gcc (could be a side
> effect of installing GNU Fortran). I don't know how to prevent that,
> except perhaps by moving /usr/local away for the duration of the
> compilation command, e.g.

I think you should edit setupext.py and edit basedir directory, and
remove all the /sw, /usr/local, etc from basedir in the 'darwin'
entry, which reads:

darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
'/usr', '/sw'],

Then do a clean rebuild and see if that helps.

JDH

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Building from source on Mac OS X

2009-08-21 Thread Tobias Wood
Hi,
I've been having the same problem. I've done some digging and now know  
why this is happening, but have no idea how to fix it! Someone has  
updated _macosx.m to use the new CTFont functionality in the 10.5 SDK.  
Unfortunately, the #ifdef checks they have put in to ensure that the  
10.5 SDK is being used don't seem to work properly, and the matplotlib  
build process specifies the 10.4 SDK. Currently the checks are done  
using:
#ifdef MAC_OS_X_VERSION_10_5
but if you are building on 10.5 this seems to always be defined, even  
with the SDK specified to 10.4. I've spent a while reading through the  
Apple docs but have to admit I'm a little mystified as to how to  
properly check for the SDK version.
Out of curiosity, why is the 10.4 SDK specified and how? Is this part  
of distutils? And why, even with the 10.4 SDK, is the resulting output  
bundle called 10.3 fat?
Toby

On 20 Aug 2009, at 16:33, Michael Hearne wrote:

> I'm attempting to build matplotlib from source (0.99.0 from
> sourceforge) on Mac OS 10.5, and I'm getting the build output below
> (with errors).  Is there some setting I need to make for the mac OS
> backend?
>
> --Mike
>
> =
> =
> =
> =
> = 
> = 
> ==
> BUILDING MATPLOTLIB
> matplotlib: 0.99.0
> python: 2.5.4 |EPD_Py25 4.3.0| (r254:67916, May 17
> 2009,
> 20:07:12)  [GCC 4.0.1 (Apple Computer, Inc.
> build
> 5370)]
>   platform: darwin
>
> REQUIRED DEPENDENCIES
>  numpy: 1.3.0
>  freetype2: 9.20.3
>
> OPTIONAL BACKEND DEPENDENCIES
> libpng: 1.2.37
>Tkinter: Tkinter: 67737, Tk: 8.4, Tcl: 8.4
>   wxPython: 2.8.7.1
> * WxAgg extension not required for wxPython
>> = 2.8
>   Gtk+: no
> * Building for Gtk+ requires pygtk; you must
> be able
> * to "import gtk" in your build/install
> environment
>Mac OS X native: yes
> Qt: no
>Qt4: no
>  Cairo: no
>
> OPTIONAL DATE/TIMEZONE DEPENDENCIES
>   datetime: present, version unknown
>   dateutil: 1.4
>   pytz: 2008c
>
> OPTIONAL USETEX DEPENDENCIES
> dvipng: no
>ghostscript: 8.54
>  latex: no
>
> [Edit setup.cfg to suppress the above messages]
> =
> =
> =
> =
> = 
> = 
> ==
> pymods ['pylab']
> packages ['matplotlib', 'matplotlib.backends',
> 'matplotlib.projections', 'mpl_toolkits', 'mpl_toolkits.mplot3d',
> 'mpl_toolkits.axes_grid', 'matplotlib.sphinxext',
> 'matplotlib.numerix', 'matplotlib.numerix.mlab',
> 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra',
> 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft',
> 'matplotlib.delaunay']
> running build
> running build_py
> copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.macosx-10.3-
> fat-2.5/matplotlib/mpl-data
> copying lib/matplotlib/mpl-data/matplotlib.conf -> build/
> lib.macosx-10.3-fat-2.5/matplotlib/mpl-data
> running build_ext
> building 'matplotlib.backends._macosx' extension
> creating build/temp.macosx-10.3-fat-2.5
> creating build/temp.macosx-10.3-fat-2.5/src
> creating build/temp.macosx-10.3-fat-2.5/CXX
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-
> aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno- 
> common -
> dynamic -DNDEBUG -g -O3 -I/tmp/_py/libraries/usr/local/include -
> DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -I/Library/Frameworks/
> Python.framework/Versions/4.3.0/lib/python2.5/site-packages/
> numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include -I/usr/
> local/include -I/usr/include -I/sw/include -I. -I/Library/Frameworks/
> Python.framework/Versions/4.3.0/lib/python2.5/site-packages/
> numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include -Isrc -
> Iagg24/include -I. -I/Library/Frameworks/Python.framework/Versions/
> 4.3.0/include/python2.5 -c src/_macosx.m -o build/temp.macosx-10.3-
> fat-2.5/src/_macosx.o
> src/_macosx.m:1885: error: syntax error before ‘setfont’
> src/_macosx.m: In function ‘setfont’:
> src/_macosx.m:1895: error: ‘CTFontRef’ undeclared (first use in this
> function)
> src/_macosx.m:1895: error: (Each undeclared identifier is reported
> only once
> src/_macosx.m:1895: error: for each function it appears in.)
> src/_macosx.m:1895: error: syntax error before ‘font’
> src/_macosx.m:2095: error: ‘font’ undeclared (first use in this
> function)
> src/_macosx.m: In function ‘GraphicsContext_draw_text’:
> src/_macosx.m:2138: error: ‘CTFontRef’ undeclared (first use in this
> function)
> src/_macosx.m:2138: error: syntax error before ‘font’
> src/_macosx.m:2163: error: ‘font’ undeclared (first use in this
> function)
> src/_macosx.m:2168: warning: assignm

[matplotlib-devel] FIFOBuffer.add() calls Bbox.update(), not a method

2009-08-21 Thread Ryanitus

Hello. 

I was doing a simple test using a FIFOBuffer.  I set the dataLim parameter
to the dataLim of a Line2D plot.  After adding a value to the FIFO, it
raises an exception.  It looks like the FIFO is trying to call
Bbox.update(), but that method does not exist.  Other update_*() methods do. 
Any ideas? 

Here's a snippet: 

import matplotlib.pyplot as plt 
from matplotlib.mlab import FIFOBuffer as FIFO 
f = FIFO(100) 
p = plt.plot([0,1,2],[0,1,2]) 
f.dataLim = p[0].get_axes().dataLim 
plt.draw() 
f.add(3,3) 

Here's the exception: 

Traceback (most recent call last): 
  File "C:\fifo.py", line 9, in  
f.add(3,3) 
  File "C:\Python26\lib\site-packages\matplotlib\mlab.py", line 1103, in add 
self.dataLim.update(xys, -1) #-1 means use the default ignore setting 
AttributeError: 'Bbox' object has no attribute 'update'
-- 
View this message in context: 
http://www.nabble.com/FIFOBuffer.add%28%29-calls-Bbox.update%28%29%2C-not-a-method-tp25088841p25088841.html
Sent from the matplotlib - devel mailing list archive at Nabble.com.


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Building from source on Mac OS X

2009-08-21 Thread Tobias Wood
I've just started getting exactly the same errors, but with Python  
2.6.2 and the most recent svn checkout. I haven't updated for a month  
or so but never had this issue before.

Toby

On 20 Aug 2009, at 16:33, Michael Hearne wrote:

> I'm attempting to build matplotlib from source (0.99.0 from
> sourceforge) on Mac OS 10.5, and I'm getting the build output below
> (with errors).  Is there some setting I need to make for the mac OS
> backend?
>
> --Mike
>
> =
> =
> =
> =
> = 
> = 
> ==
> BUILDING MATPLOTLIB
> matplotlib: 0.99.0
> python: 2.5.4 |EPD_Py25 4.3.0| (r254:67916, May 17
> 2009,
> 20:07:12)  [GCC 4.0.1 (Apple Computer, Inc.
> build
> 5370)]
>   platform: darwin
>
> REQUIRED DEPENDENCIES
>  numpy: 1.3.0
>  freetype2: 9.20.3
>
> OPTIONAL BACKEND DEPENDENCIES
> libpng: 1.2.37
>Tkinter: Tkinter: 67737, Tk: 8.4, Tcl: 8.4
>   wxPython: 2.8.7.1
> * WxAgg extension not required for wxPython
>> = 2.8
>   Gtk+: no
> * Building for Gtk+ requires pygtk; you must
> be able
> * to "import gtk" in your build/install
> environment
>Mac OS X native: yes
> Qt: no
>Qt4: no
>  Cairo: no
>
> OPTIONAL DATE/TIMEZONE DEPENDENCIES
>   datetime: present, version unknown
>   dateutil: 1.4
>   pytz: 2008c
>
> OPTIONAL USETEX DEPENDENCIES
> dvipng: no
>ghostscript: 8.54
>  latex: no
>
> [Edit setup.cfg to suppress the above messages]
> =
> =
> =
> =
> = 
> = 
> ==
> pymods ['pylab']
> packages ['matplotlib', 'matplotlib.backends',
> 'matplotlib.projections', 'mpl_toolkits', 'mpl_toolkits.mplot3d',
> 'mpl_toolkits.axes_grid', 'matplotlib.sphinxext',
> 'matplotlib.numerix', 'matplotlib.numerix.mlab',
> 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra',
> 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft',
> 'matplotlib.delaunay']
> running build
> running build_py
> copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.macosx-10.3-
> fat-2.5/matplotlib/mpl-data
> copying lib/matplotlib/mpl-data/matplotlib.conf -> build/
> lib.macosx-10.3-fat-2.5/matplotlib/mpl-data
> running build_ext
> building 'matplotlib.backends._macosx' extension
> creating build/temp.macosx-10.3-fat-2.5
> creating build/temp.macosx-10.3-fat-2.5/src
> creating build/temp.macosx-10.3-fat-2.5/CXX
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-
> aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno- 
> common -
> dynamic -DNDEBUG -g -O3 -I/tmp/_py/libraries/usr/local/include -
> DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -I/Library/Frameworks/
> Python.framework/Versions/4.3.0/lib/python2.5/site-packages/
> numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include -I/usr/
> local/include -I/usr/include -I/sw/include -I. -I/Library/Frameworks/
> Python.framework/Versions/4.3.0/lib/python2.5/site-packages/
> numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include -Isrc -
> Iagg24/include -I. -I/Library/Frameworks/Python.framework/Versions/
> 4.3.0/include/python2.5 -c src/_macosx.m -o build/temp.macosx-10.3-
> fat-2.5/src/_macosx.o
> src/_macosx.m:1885: error: syntax error before ‘setfont’
> src/_macosx.m: In function ‘setfont’:
> src/_macosx.m:1895: error: ‘CTFontRef’ undeclared (first use in this
> function)
> src/_macosx.m:1895: error: (Each undeclared identifier is reported
> only once
> src/_macosx.m:1895: error: for each function it appears in.)
> src/_macosx.m:1895: error: syntax error before ‘font’
> src/_macosx.m:2095: error: ‘font’ undeclared (first use in this
> function)
> src/_macosx.m: In function ‘GraphicsContext_draw_text’:
> src/_macosx.m:2138: error: ‘CTFontRef’ undeclared (first use in this
> function)
> src/_macosx.m:2138: error: syntax error before ‘font’
> src/_macosx.m:2163: error: ‘font’ undeclared (first use in this
> function)
> src/_macosx.m:2168: warning: assignment makes pointer from integer
> without a cast
> src/_macosx.m:2170: error: ‘kCTFontAttributeName’ undeclared (first
> use in this function)
> src/_macosx.m:2171: error: ‘kCTForegroundColorAttributeName’
> undeclared (first use in this function)
> src/_macosx.m:2191: error: ‘CTLineRef’ undeclared (first use in this
> function)
> src/_macosx.m:2191: error: syntax error before ‘line’
> src/_macosx.m:2194: error: ‘line’ undeclared (first use in this
> function)
> src/_macosx.m: In function
> ‘GraphicsContext_get_text_width_height_descent’:
> src/_macosx.m:2238: error: ‘CTFontRef’ undeclared (first use in this
> function)
> src/_macosx.m:2238: error: syntax error before ‘font’
> src/_macosx.m:2251: 

Re: [matplotlib-devel] FIFOBuffer.add() calls Bbox.update(), not a method

2009-08-21 Thread John Hunter
On Fri, Aug 21, 2009 at 6:24 PM, Ryanitus wrote:
>
> Hello.
>
> I was doing a simple test using a FIFOBuffer.  I set the dataLim parameter
> to the dataLim of a Line2D plot.  After adding a value to the FIFO, it
> raises an exception.  It looks like the FIFO is trying to call
> Bbox.update(), but that method does not exist.  Other update_*() methods do.
> Any ideas?

In mpl 0.98 we did a big refactoring of the transformations
infrastructure but this class was not properly poprted.  I've fixed it
in the svn release branch so it should be fixed in the next release
(0.99.1)

Thanks for the report,
JDH

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] FIFOBuffer.add() calls Bbox.update(), not a method

2009-08-21 Thread Ryanitus

With regards to the update() function, is it supposed to actually add the
data point to the graph?  After making the change and re-running the
program, the plot does not contain the new data point.  

Thanks,
Ryan


John Hunter-4 wrote:
> 
> On Fri, Aug 21, 2009 at 6:24 PM, Ryanitus wrote:
>>
>> Hello.
>>
>> I was doing a simple test using a FIFOBuffer.  I set the dataLim
>> parameter
>> to the dataLim of a Line2D plot.  After adding a value to the FIFO, it
>> raises an exception.  It looks like the FIFO is trying to call
>> Bbox.update(), but that method does not exist.  Other update_*() methods
>> do.
>> Any ideas?
> 
> In mpl 0.98 we did a big refactoring of the transformations
> infrastructure but this class was not properly poprted.  I've fixed it
> in the svn release branch so it should be fixed in the next release
> (0.99.1)
> 
> Thanks for the report,
> JDH
> 
> --
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day 
> trial. Simplify your report design, integration and deployment - and focus
> on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/FIFOBuffer.add%28%29-calls-Bbox.update%28%29%2C-not-a-method-tp25088841p25090188.html
Sent from the matplotlib - devel mailing list archive at Nabble.com.


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] cbook.py, maxdict class key checking on __setitem__

2009-08-21 Thread Ryanitus

I may have found a bug in the __setitem__ method of the maxdict class.

Since a dictionary is a mapping class, if an item is set that already
exists, it overwrites the previous.  However, you are still appending that
item to _killkeys regardless.

In the case where 2 items with the same key were added and later removed due
to size constraints, the line in bold would throw an exception on the second
call.

By checking for the key existance, you handle that situation gracefully. 
The item can still be removed from _killkeys, since it's the next to go
anyway.

Ryan

Original code (circa line 776):

if len(self)>=self.maxsize:
del self[self._killkeys[0]]
del self._killkeys[0]
dict.__setitem__(self, k, v)
self._killkeys.append(k)

Possible solution:

if len(self)>=self.maxsize:
if self.has_key(self._killkeys[0]):
del self[self._killkeys[0]]
del self._killkeys[0]
dict.__setitem__(self, k, v)
self._killkeys.append(k)



-- 
View this message in context: 
http://www.nabble.com/cbook.py%2C-maxdict-class-key-checking-on-__setitem__-tp25090453p25090453.html
Sent from the matplotlib - devel mailing list archive at Nabble.com.


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Building from source on Mac OS X

2009-08-21 Thread Jouni K . Seppänen
Tobias Wood  writes:

> Out of curiosity, why is the 10.4 SDK specified and how? Is this part  
> of distutils? And why, even with the 10.4 SDK, is the resulting output  
> bundle called 10.3 fat?

I think Python remembers the compiler flags used to compile the Python
interpreter and uses them when compiling extensions. The downloadable
Python interpreter has been compiled with maximal compatibility in mind:
it's Universal (i.e., both ppc and i386), and probably works on any
version of OS X from 10.3.9 onwards.

I just compiled Python 2.6.2 myself on OS X 10.5, and it wasn't
difficult at all:

./configure --enable-framework
make
sudo make install
sudo chmod g+w /Library/Frameworks/Python.framework/Versions/\
2.6/{bin,lib/python2.6/site-packages}

That last command is there to let me install further packages without
sudo. Installing numpy from numpy-1.3.0-py2.6-macosx10.5.dmg worked
well, and I had no problems compiling matplotlib. The resulting files
are of course specific to i386, OS X version 10.5, and probably some
libraries on my system, so they are not good for distribution, but I
seemed to avoid all the usual problems with compiling matplotlib.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Building from source on Mac OS X

2009-08-21 Thread Jouni K . Seppänen
Tobias Wood  writes:

> I've just started getting exactly the same errors, but with Python  
> 2.6.2 and the most recent svn checkout. I haven't updated for a month  
> or so but never had this issue before.

>> src/_macosx.m:1885: error: syntax error before ‘setfont’
>> src/_macosx.m: In function ‘setfont’:
>> src/_macosx.m:1895: error: ‘CTFontRef’ undeclared (first use in this
>> function)

I committed to trunk a change that I think should fix this problem.
Please test.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel