cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
84 stars 26 forks source link

emerge sage-doc tries to install using wrong Python version #672

Closed WPettersson closed 2 years ago

WPettersson commented 2 years ago

So I have python:3.10 installed as well as python:3.9, but python 3.9 is default. I tried to install sagemath using the new @sagemath set, but when building sage-doc I get the error shown below. I have sage_docbuild successfully installed with PYTHON_TARGETS=python3_9 but for some reason portage is trying to install sage-doc with python3.10. I had a quick look at the ebuild file, but couldn't work out why.

emerge.log

>>> Emerging (1 of 1) sci-mathematics/sage-doc-9.5::sage-on-gentoo
 * sage-doc-9.5.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                        [ ok ]
 * Using python3.10 to build
>>> Unpacking source...
>>> Unpacking sage-doc-9.5.tar.gz to /tmp/portage/sci-mathematics/sage-doc-9.5/work
>>> Source unpacked in /tmp/portage/sci-mathematics/sage-doc-9.5/work
>>> Preparing source in /tmp/portage/sci-mathematics/sage-doc-9.5/work/sage-9.5 ...
 * bootstrapping the documentation - be patient
 * Applying sage-doc-9.5-neutering.patch ...                                                                                                                              [ ok ]
 * Applying sage-doc-9.5-makefile.patch ...                                                                                                                               [ ok ]
>>> Source prepared.
>>> Configuring source in /tmp/portage/sci-mathematics/sage-doc-9.5/work/sage-9.5 ...
>>> Source configured.
>>> Compiling source in /tmp/portage/sci-mathematics/sage-doc-9.5/work/sage-9.5 ...
make -j12 doc-html PYTHON=/usr/bin/python3.10 
/usr/bin/python3.10: No module named sage_docbuild
Error: '/usr/bin/python3.10 -m sage_docbuild --all-documents' failed
make: *** [Makefile:29: doc-inventory-reference] Error 1
 * ERROR: sci-mathematics/sage-doc-9.5::sage-on-gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sci-mathematics/sage-doc-9.5::sage-on-gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sci-mathematics/sage-doc-9.5::sage-on-gentoo'`.
 * The complete build log is located at '/tmp/portage/sci-mathematics/sage-doc-9.5/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/sci-mathematics/sage-doc-9.5/temp/environment'.
 * Working directory: '/tmp/portage/sci-mathematics/sage-doc-9.5/work/sage-9.5/src/doc'
 * S: '/tmp/portage/sci-mathematics/sage-doc-9.5/work/sage-9.5'

>>> Failed to emerge sci-mathematics/sage-doc-9.5, Log file:

>>>  '/tmp/portage/sci-mathematics/sage-doc-9.5/temp/build.log'

emerge --info | grep 'dev-lang/python'

dev-lang/python:           3.9.9-r1::gentoo, 3.10.0_p1-r1::gentoo
kiwifb commented 2 years ago

Right, I forgot to re-enable some version check logic before pushing to master. I hope re-enabling it will help with your problem. If not, I'll have to ask for with the python-any-r1 eclass. Can you sync the overlay and try sage-doc again?

WPettersson commented 2 years ago

Synced, and it works, sage-doc is installed :)