New ebuild for sync2cd-0.9.
Created attachment 59064 [details] sync2cd-0.9.ebuild To be put into app-cdr/sync2cd.
looks good
Is it normal that the ebuild has to call python_mod_compile in pkg_postinst to compile the python modules? Wasn't this automatic before? I see at least one other ebuild (gnome-python) calls python_mod_optimize, and python_mod_cleanup in pkg_postrm. Should the latter also be added?
Remy, You're right - python_mod_compile in src_install is a bit odd. I'm not sure if anything has changed as I don't maintain many (any?) python modules. I'd look for more examples of dist eclass usage. When I get around to this one I'll consult some of the more python savy devs.
Looking at distutils_src_install(), it seems that starting with python-2.3, modules are not compiled through distutils anymore, but later in distutils_pkg_postinst(), where python_mod_optimize() is called with every module in PYTHON_MODNAME. This will compile the modules, but only if they are packages, i.e. subdirectories of /usr/lib/pythonX.Y/site-packages. This ebuild, however, installs just one file at this location. The comment at the beginning of python_mod_compile() seems to indicate that this is the function to call for the job. That's why I added the call in pkg_postinst(). Would it make sense to change distutils_pkg_postinst() to call python_mod_compile() if a module in PYTHON_MODNAME is a file instead of a directory? I could write a patch for that, if it does.
python people - any comment on comment #5
Daniel, I noticed you added an ebuild for sync2cd-0.9 to portage, pretty much identical to the old 0.8 ebuild. Did you get any answers to the questions above? I'm always interested in improving my ebuild writing skills ;-)
sorry Remy - I'm not that familiar with the internals of python building. I was hoping on of the python herd members could answer your question.
No problem. But would it be possible to add the dependency on virtual/eject, as it is used during restore, and to add the src_test() function so that the unit tests are run? This would allow catching platform-specific bugs. RDEPEND="virtual/eject" src_test() { cd ${S}/tests ./runTests.py || die "Unit tests failed" }
Version 1.0 is out.
Created attachment 84149 [details] sync2cd-1.1.ebuild Ebuild for new version. I added running of the test suite during the test phase.
Comment on attachment 84149 [details] sync2cd-1.1.ebuild Version 1.1 is out. Massively decreased memory usage for large archives.
*** Bug 133105 has been marked as a duplicate of this bug. ***
Fixed In CVS