Hi,

> Anyway, since the mathtex setup infrastructure is based on what  
> matplotlib was already doing, there's a common convention we can  
> exploit.  Essentially, the matplotlib setup.py builds up a list of  
> extension modules (ext_modules) and packages and then passes those  
> lists to distutils for building.  So, in theory, all mathtex needs  
> to do is provide a function that will add extension modules and  
> packages to those lists (basically like all of the build_* methods  
> in setupext.py).  So basically, matplotlib's setup.py would import  
> lib/mathtex/setupext.py (by filename) and call a method in it.  Lots  
> of details I'm missing, but that should provide a general framework.

Not sure about the extension modules + lists stuff, although  
setuptools is not my area of expertise. Sadly executing the lib/ 
mathtex/setup.py file isn't really an option either, so I'll need to  
think on it. Might need to ask for some help though.

>
> Another issue this raises is whether to build the FT2Font and png  
> modules twice, once as part of matplotlib, and once as part of  
> mathtex.  Once mathtex is a truly external dependency for  
> matplotlib, I don't see a way around this, so maybe we should just  
> pretend we're already there, despite the duplication.  If we want to  
> be clever, I could see mathtex being smart about imports: try  
> importing its local copies of its libraries and failing that import  
> matplotlib's.  I'm not entirely sure about that idea, but I sort of  
> feel "hacky-if-you-do, hacky-if-you-don't" here ;)

I don't think it hurts having two FT2Font wrappers lying around on a  
system.

> Please try to use svn:externals if you can -- that will make pulling  
> updates from mathtex easier.  I've never used it cross-repository  
> like this, so there may be unforeseen issues.

svn:externals seems to work quite well and is currently used in the  
mathtex branch to pull mathtex.

> It also just occurred to me that we might want to take another step  
> in preparation for mathtex as an external dependency: make it  
> optional.  That is, if importing mathtex fails, be able to render  
> regular text, and warn if trying to render math text.

Shouldn't be too hard to add, I'll write in backend support today.

Regards, Freddie.

------------------------------------------------------------------------------
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to