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

Derek Homeier <[email protected]>
Newsgroups gmane.os.apple.fink.devel
Message-ID <0C305516-2326-40E3-A8AF-3591AA569783@astro.physik.uni-goettingen.de>
Hi Kurt,

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...

> On 11 Feb 2016, at 1:22 am, Alexander Hansen <[email protected]> wrote:
> 
>> On Feb 10, 2016, at 15:55, Derek Homeier <[email protected]> wrote:
>> 
>> 
>>> On 11 Feb 2016, at 12:35 am, Alexander Hansen <[email protected]> wrote:
> 
>> One could certainly call the find command _at the beginning_ of Install (and still on %b/build),
>> which should do the job as well in perhaps somewhat simpler language. On the other hand I
>> find it preferable for the TestScript to cleanup its own mess, and exactly that…
>> 
>> Cheers,
>> 				Derek
>> 
> 
> Ah, OK, I understand the situation a bit better now.  
> 
> Interestingly enough, I didn’t trigger the failure when building matplotlib-py35 or matplotlib-py27 here (10.11) using -m mode, possibly because of test errors.  I’ll send those in a  separate thread.

I wanted to check if the verification for some reason only fails on case-sensitive FS, so I tried the
same on another 10.11 machine with standard HFS+ (otherwise nearly identical iMac), but instead
got this segfault of the python interpreter itself (excerpts of huge coredump below).
Happened with both python2.7 and python3.5, with identical OS and Xcode versions as my other
iMac on 10.11; I rebuilt both python packages and tried to rebuild all matplotlib dependencies
(all QT4 and QT5 libraries in particular, but to no avail.
Might be a broken Xcode installation, but at least for libdyld.dylib I checked it is identical (by md5sum)
on both machines…

Cheers,
					Derek

Feb 11 22:51:59  python3.5[10030] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 11 22:51:59  python3.5[10030] <Warning>: Invalid Connection ID 0
2016-02-11 22:52:01.536 python3.5[10030:3820856] An uncaught exception was raised
2016-02-11 22:52:01.536 python3.5[10030:3820856] *** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray
2016-02-11 22:52:01.537 python3.5[10030:3820856] (
	0   CoreFoundation                      0x00007fff8510cae2 __exceptionPreprocess + 178
	1   libobjc.A.dylib                     0x00007fff8fa9e73c objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff850a31f5 -[__NSArray0 objectAtIndex:] + 101
	3   QtGui                               0x000000010f991d56 _ZN28QDesktopWidgetImplementation8onResizeEv + 150
	4   QtGui                               0x000000010f991c56 _ZN28QDesktopWidgetImplementationC2Ev + 54
	5   QtGui                               0x000000010f99215c _ZL28qdesktopWidgetImplementationv + 60
	6   QtGui                               0x000000010f992659 _ZNK14QDesktopWidget13primaryScreenEv + 9
	7   QtGui                               0x000000010f976f33 _ZN14QWidgetPrivate10create_sysElbb + 291
	8   QtGui                               0x000000010fa26ddd _ZN7QWidget6createElbb + 701
	9   QtGui                               0x000000010fe22b2c _ZN15QToolBarPrivate4initEv + 252
	10  QtGui                               0x000000010fe23b65 _ZN8QToolBarC2EP7QWidget + 229
	11  QtGui.so                            0x000000010f4948ff _ZL18init_type_QToolBarP17_sipSimpleWrapperP7_objectS2_PS2_S3_S3_ + 495
	12  sip.so                              0x000000010e23f7d4 sipSimpleWrapper_init + 187
	13  libpython3.5m.dylib                 0x000000010ba2f58c wrap_init + 12
	14  libpython3.5m.dylib                 0x000000010b9d43d1 PyObject_Call + 97
...
	454 libpython3.5m.dylib                 0x000000010bad3f7e Py_Main + 2526
	455 python3.5                           0x000000010b9bee1d main + 237
	456 libdyld.dylib                       0x00007fff85e0f5ad start + 1
	457 ???                                 0x0000000000000004 0x0 + 4
)
2016-02-11 22:52:01.538 python3.5[10030:3820856] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff8510cae2 __exceptionPreprocess + 178
...
	454 libpython3.5m.dylib                 0x000000010bad3f7e Py_Main + 2526
	455 python3.5                           0x000000010b9bee1d main + 237
	456 libdyld.dylib                       0x00007fff85e0f5ad start + 1
	457 ???                                 0x0000000000000004 0x0 + 4
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Fatal Python error: Aborted

Current thread 0x00007fff72da1000 (most recent call first):
  File "/sw/src/fink.build/matplotlib-py35-1.5.1-2/matplotlib-1.5.1/build/lib.macosx-10.11-x86_64-3.5/matplotlib/backends/backend_qt5.py", line 565 in __init__
  File "/sw/src/fink.build/matplotlib-py35-1.5.1-2/matplotlib-1.5.1/build/lib.macosx-10.11-x86_64-3.5/matplotlib/backends/backend_qt5.py", line 520 in _get_toolbar
  File "/sw/src/fink.build/matplotlib-py35-1.5.1-2/matplotlib-1.5.1/build/lib.macosx-10.11-x86_64-3.5/matplotlib/backends/backend_qt5.py", line 462 in __init__
  File "/sw/src/fink.build/matplotlib-py35-1.5.1-2/matplotlib-1.5.1/build/lib.macosx-10.11-x86_64-3.5/matplotlib/backends/backend_qt4agg.py", line 54 in new_figure_manager_given_figure
  File "/sw/src/fink.build/matplotlib-py35-1.5.1-2/matplotlib-1.5.1/build/lib.macosx-10.11-x86_64-3.5/matplotlib/backends/backend_qt4agg.py", line 46 in new_figure_manager
  File "/sw/src/fink.build/matplotlib-py35-1.5.1-2/matplotlib-1.5.1/build/lib.macosx-10.11-x86_64-3.5/matplotlib/pyplot.py", line 527 in figure
  File "/sw/src/fink.build/matplotlib-py35-1.5.1-2/matplotlib-1.5.1/build/lib.macosx-10.11-x86_64-3.5/matplotlib/tests/test_backend_qt4.py", line 50 in test_fig_close
  File "/sw/src/fink.build/matplotlib-py35-1.5.1-2/matplotlib-1.5.1/build/lib.macosx-10.11-x86_64-3.5/matplotlib/testing/decorators.py", line 376 in backend_switcher
  File "/sw/src/fink.build/matplotlib-py35-1.5.1-2/matplotlib-1.5.1/build/lib.macosx-10.11-x86_64-3.5/matplotlib/testing/decorators.py", line 53 in failer
  File "/sw/src/fink.build/matplotlib-py35-1.5.1-2/matplotlib-1.5.1/build/lib.macosx-10.11-x86_64-3.5/matplotlib/testing/decorators.py", line 118 in wrapped_function
  File "/sw/lib/python3.5/site-packages/nose/case.py", line 198 in runTest
  File "/sw/lib/python3.5/unittest/case.py", line 600 in run
  File "/sw/lib/python3.5/unittest/case.py", line 648 in __call__
  File "/sw/lib/python3.5/site-packages/nose/case.py", line 152 in runTest
  File "/sw/lib/python3.5/site-packages/nose/case.py", line 134 in run
  File "/sw/lib/python3.5/site-packages/nose/case.py", line 46 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 225 in run
  File "/sw/lib/python3.5/site-packages/nose/suite.py", line 178 in __call__
  File "/sw/lib/python3.5/site-packages/nose/core.py", line 62 in run
  File "/sw/lib/python3.5/site-packages/nose/core.py", line 207 in runTests
  File "/sw/lib/python3.5/unittest/main.py", line 94 in __init__
  File "/sw/lib/python3.5/site-packages/nose/core.py", line 121 in __init__
  File "/sw/lib/python3.5/site-packages/nose/core.py", line 301 in run
  File "/sw/src/fink.build/matplotlib-py35-1.5.1-2/matplotlib-1.5.1/build/lib.macosx-10.11-x86_64-3.5/matplotlib/__init__.py", line 1536 in test
  File "<string>", line 1 in <module>
/tmp/fink.tMHkA: line 3: 10030 Abort trap: 6           /sw/bin/python3.5 -B -c 'import matplotlib as m, sys; r=m.test(verbosity=1); sys.exit(1*(not r))'
### execution of /tmp/fink.tMHkA failed, exit code 134
### execution of /tmp/fink.mb8Qh failed, exit code 134



------------------------------------------------------------------------------
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.