On 12 Feb 2016, at 8:42 pm, Derek Homeier 
<de...@astro.physik.uni-goettingen.de> wrote:
> 
> On 11 Feb 2016, at 2:12 pm, Kurt Schwehr <kurtschw...@yahoo.com> wrote:
>> 
>> Sorry, I'm totally not following how this should be fixed.  I'm feeling 
>> rather brain dead at the moment.
>> 
> Seems we have two options -
> change the TestScript as suggested to let python cleanup the byte-compiled 
> files from the test run:
> 
> InfoTest: <<
> TestDepends: ffmpeg, inkscape, nose-py%type_pkg[python], ( %type_pkg[python] 
> <= 27 ) mock-py%type_pkg[python]
> TestScript: <<
>  #!/bin/bash -ev
>  export PYTHONPATH=$(ls -d %b/build/lib.macosx-*-%type_raw[python])
>  %p/bin/python%type_raw[python] -B -c 'import matplotlib as m, os, sys; 
> r=m.test(verbosity=1); os.system("find 
> %b/build/lib.macosx-*-%type_raw[python] -name \*.py[
> oc] -exec rm {} \;"); sys.exit(1-r)'
> <<
> TestSuiteSize: large
> <<
> 
> or let the InstallScript do the cleanup afterwards:
> 
> InstallScript: <<
> #!/bin/sh -ev
> export 
> PKG_CONFIG_PATH="%p/lib/pango-ft219/lib/pkgconfig:%p/lib/fontconfig2/lib/pkgconfig:%p/lib/freetype219/lib/pkgconfig:$PKG_CONFIG_PATH"
> find %b/build/lib.macosx-*-%type_raw[python] -name \*.py[oc] -exec rm {} \;
> %p/bin/python%type_raw[python] setup.py install --root %d
> mkdir -p %i/share/doc/%n
> cp -R examples %i/share/doc/%n
> <<
> 
> Both versions worked for me, so it’s mainly a decision on 
> aesthetic/philosophical grounds.
> Commented on one of the errors in the other thread, but I found a different 
> one on another
> machine...

I just noticed another issue with the current setup: since the macosx backend 
is auto-detected,
although it is later disabled due to the non-Framework build, it is still 
written as default into the
system matplotlibrc. As a consequence, for users with a clean setup, like 
fink-bld when testing
other packages, ‘import matplotlib.pyplot’ will fail.
Explicitly disabling the backend in setup.cfg will let setup.py pick a default 
that’s actually working
with the package. It then chose qt5agg however, which seems to work alright 
with a plain python,
and I did not see any immediate problems with 'ipython —pylab’; nonetheless the 
more prudent
solution might be to set this explicitly instead, e.g. add this to the patch

--- a/setup.py
+++ b/setup.py
@@ -149,7 +149,7 @@ if __name__ == '__main__':
     package_dir = {'': 'lib'}
     install_requires = []
     setup_requires = []
-    default_backend = None
+    default_backend = 'qt4agg'
 
     # Go through all of the packages and figure out which ones we are
     # going to build/install.


Attachment: matplotlib-py.patch
Description: Binary data


Cheers,
                                        Derek

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to