Created attachment 284243 [details] pytest-2.0.3.ebuild.patch The file pytest-2.0.3/testing/acceptance_test.py, in the function test_cmdline_python_package, does monkeypatch.delenv('PYTHONDONTWRITEBYTECODE', False) and then runs Python on its own to-be-installed modules. This causes .pyc files to be written in pytest-2.0.3/build-*/lib, which then get installed. If pytest was previously installed without running tests, this can cause collision errors with the .pyc files that were written by python_mod_optimize from python.eclass. The most straightforward way to fix this would appear to be python_clean_installation_image, as in the attached patch, although it generates a load of ewarns which might not be desirable.
(In reply to comment #0) > The most straightforward way to fix this would appear to be > python_clean_installation_image, as in the attached patch, although it > generates a load of ewarns which might not be desirable. Just noticed that python_clean_installation_image has a --quiet option, so I suppose that would be the thing to use.
+*pytest-2.1.1 (11 Sep 2011) + + 11 Sep 2011; Mike Gilbert <floppym@gentoo.org> +pytest-2.1.1.ebuild: + Version bump. Clean out pyc files; bug 380275. Thanks to David Leverton for + the suggestion. +