> On 11 Feb 2016, at 12:35 am, Alexander Hansen <alexanderk.han...@gmail.com> > wrote: > >> when building the updated matplotlib package in maintainer mode, after the >> tests are run I am >> still getting the dreaded verification error for the .deb: >> >> Error: Compiled python module points to fink build dir. >> >> Uncommenting the cleanup line does not help, because after a few Fails and >> Errors in the >> test suite the script exits immediately. I have not found any way to exit >> the python command >> with the test with a nonzero return value that would not cause ‘bash -e’ to >> immediately exit, >> so the only way to get rid of the compiled files and still save the test >> result might be to do >> the cleanup within the python call itself: >> >> %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)' >> >> lets the test phase finish with a warning for the current bunch of failures, >> and should pass if >> the tests all succeed. Bit lengthy perhaps, but it sees to do the job. >> >> Cheers, >> Derek >> > > How about putting the command (or perhaps a different one) at the end of the > InstallScript instead and apply it to the deb root directory (%i)? The > .deb-directory validation is run after the InstallScript. > > If the package is building the .deb differently depending on whether the test > suite is run or not, it breaks our fundamental premise of invariant .debs.
The cleanup is actually there to make sure it does build the same way, as it only removes the files that were byte-compiled in the test run in the first place (since 'python -B' has no effect here for whatever reason). Putting it into the InstallScript to run on %i at the end would be entirely counter-productive, as it would just remove _all_ .pyc files that were precompiled by 'setup.py install' in the right place: byte-compiling /scratch.noindex/fink.build/root-matplotlib-py27-1.5.1-2/sw/lib/python2.7/site-packages/mpl_toolkits/tests/test_axes_grid.py to test_axes_grid.pyc byte-compiling /scratch.noindex/fink.build/root-matplotlib-py27-1.5.1-2/sw/lib/python2.7/site-packages/mpl_toolkits/tests/test_axes_grid1.py to test_axes_grid1.pyc byte-compiling /scratch.noindex/fink.build/root-matplotlib-py27-1.5.1-2/sw/lib/python2.7/site-packages/mpl_toolkits/tests/test_mplot3d.py to test_mplot3d.pyc running install_egg_info running egg_info … Writing control file... Writing md5sums file... Validating .deb dir /scratch.noindex/fink.build/root-matplotlib-py27-1.5.1-2... Package looks good! 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 ------------------------------------------------------------------------------ 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