Re: Byte-compiled files in matplotlib-py-1.5.1-2

Kurt Schwehr <[email protected]>
Newsgroups gmane.os.apple.fink.devel
Message-ID <[email protected]>
Derek,
If you have a working setup for matplotlib, can you commit it?
-kurt 

    On Monday, February 15, 2016 8:57 AM, Derek Homeier <[email protected]> wrote:
 

 On 12 Feb 2016, at 8:42 pm, Derek Homeier <[email protected]> wrote:
> 
> On 11 Feb 2016, at 2:12 pm, Kurt Schwehr <[email protected]> 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.




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
[email protected]
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.