The test suite of dev-python/sphinx-1.3.1 (currently unstable) fails with errors of the form ERROR: Failure: ImportError (No module named 'sphinx_rtd_theme') Reproducible: Always Steps to Reproduce: 1. Unmerge dev-python/sphinx and dev-python_rtd_theme 2. emerge dev-python/sphinx (At least on my PC the merge order is consistent over time. The calculation may, however, depend on other things, too.) Actual Results: Fails with above errors. Expected Results: A emerge of the packages with no errors. The reason is that when issuing 'emerge dev-python/sphinx' (with FEATURES="test"), emerge calculates the following merge order: dev-python/sphinx-1.3.1 {test} dev-python/sphinx_rtd_theme-0.1.6 But the test of sphinx depend on the sphinx_rtd_theme yielding the above error. Workaround: Emerge sphinx_rtd_theme before sphinx: emerge -1 dev-python/sphinx_rtd_theme emerge dev-python/sphinx Suggested solution: Add test? ( =dev-python/sphinx_rtd_theme-0.1*[${PYTHON_USEDEP}] ) to DEPEND.
Addendum: sphinx-1.3.1 has sphinx_rtd_theme in its RDEPEND and vice versa.
I don't follow. (In reply to gentoo_usr from comment #1) > Addendum: > sphinx-1.3.1 has sphinx_rtd_theme in its RDEPEND and vice versa. PDEPEND="dev-python/sphinx[${PYTHON_USEDEP}]" nor RDEPEND it appears this sets the order wrongly. What good reason is there to have it set to PDEPEND?
commit d186d72a2b94603423b7d4501b7b3b065b4ba7d2 Author: Ian Delaney <idella4@gentoo.org> Date: Fri Oct 9 12:18:49 2015 +0800 dev-python/sphinx_rtd_theme: reset sphinx to DEPEND
Hey, Thanks for taking care of this. (In reply to Ian Delaney from comment #2) > I don't follow. (In reply to gentoo_usr from comment #1) > > Addendum: > > sphinx-1.3.1 has sphinx_rtd_theme in its RDEPEND and vice versa. > > PDEPEND="dev-python/sphinx[${PYTHON_USEDEP}]" > nor RDEPEND it appears this sets the order wrongly. > What good reason is there to have it set to PDEPEND? Sorry, my fault. I misread the 'P' as an 'R', so simply forget that. (In reply to Ian Delaney from comment #3) > commit d186d72a2b94603423b7d4501b7b3b065b4ba7d2 > Author: Ian Delaney <idella4@gentoo.org> > Date: Fri Oct 9 12:18:49 2015 +0800 > > dev-python/sphinx_rtd_theme: reset sphinx to DEPEND This does not solve the problem. The problem is that sphinx_rtd_theme gets merge AFTER sphinx, while the test suite of sphinx depends on sphinx_rtd_theme being already installed. So sphinx_rtd_theme SHOULD be merged BEFORE sphinx. (At least if the 'test' FEATURES is set.) The commit d186d72a2b94603423b7d4501b7b3b065b4ba7d2 does not solve this, it makes it worse in the sense that sphinx_rtd_theme now strictly depends on sphinx. Proposed solution: - Revert d186d72a2b94603423b7d4501b7b3b065b4ba7d2, so sphinx can be merged AFTER sphinx_rtd_theme. - Add "test? ( =dev-python/sphinx_rtd_theme-0.1*[${PYTHON_USEDEP}] )" to DEPEND, since sphinx_rtd_theme is only needed for testing, not for the build/install itself. This forces sphinx_rtd_theme to be merged BEFORE sphinx. (The version number in the DEPEND may be changed at your will, as currently any version will do it.)
Just looked at the newly ebuild sphinx-1.3.1-r1. [0] There the dependency of sphinx_rtd_theme is split out from RDEPEND into PDEPEND. That, however, does not change anything with respect to the 'test' feature and the merge order as reported here. The suggested solution is still applicable. Also the version number in the sphinx_rtd_theme dependency was dropped, so I suggest dropping it also in the solution. While we are at it. The DEPEND line reads 'DEPEND="$DEPEND ...', so it includes itself. But I don't know if this is intentionally or a misspelled RDEPEND. [0] https://github.com/gentoo/gentoo/blob/master/dev-python/sphinx/sphinx-1.3.1-r1
It appears you pose a nonsense solution. work/sphinx_rtd_theme-0.1.9/requirements.txt says sphinx>=1.3.. This automatically pulls sphinx in before sphinx_rtd_theme
commit 373963fd562dbdc17f5647ea170ac1590eb93a76 Author: Justin Lecher <jlec@gentoo.org> Date: Wed Oct 14 15:50:57 2015 +0200 dev-python/sphinx: Move dev-python/sphinx_rtd_theme from PDEPEND to RDEPEND Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=561776 Package-Manager: portage-2.2.23 Signed-off-by: Justin Lecher <jlec@gentoo.org> https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=373963fd562dbdc17f5647ea170ac1590eb93a76 commit 82e30f2c0b72cbec1ef42d4cdda5f61476c4c917 Author: Justin Lecher <jlec@gentoo.org> Date: Wed Oct 14 15:47:10 2015 +0200 dev-python/sphinx_rtd_theme: Drop dev-python/sphinx from *DEPEND this package provides a theme. So no need to depend on sphinx at all. Packages including sphinx should depend on the theme. Gentoo-Bugs: https://bugs.gentoo.org/show_bug.cgi?id=561776 Package-Manager: portage-2.2.23 Signed-off-by: Justin Lecher <jlec@gentoo.org> https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82e30f2c0b72cbec1ef42d4cdda5f61476c4c917