cschwan / sage-on-gentoo

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

python3.10 and ExportSageNB #691

Closed strogdon closed 2 years ago

strogdon commented 2 years ago

My Prefix somehow got corrupted - perhaps a hard drive issue. I reinstalled a new Prefix and so far OK. To save cpu cycles I tried to install sage-9999 without python3.9 and I got

The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by sci-mathematics/sage_docbuild-9999::sage-on-gentoo
# required by sci-mathematics/sage-doc-9999::sage-on-gentoo
# required by @sagemath (argument)
>=sci-mathematics/sage-9999 python_targets_python3_9

I removed python3.9 from PYTHON_TARGETS and discovered that ExportSageNB-3.3 needs that python. I believe vanilla sagenb_export builds against python3.10. Is there any reason that shouldn't work with s-o-g. I'm assuming that the python3.9 requirement to build sage-9999 is because of ExportSageNB-3.3.

kiwifb commented 2 years ago

An oversight. There are a few ebuilds that may need updating. The latest sagetex is also capped at python 3.9.

kiwifb commented 2 years ago

Ok let's see if it fixes your issue.

strogdon commented 2 years ago

It fixed ExportSageNB but you are correct in that sagetex now prevents using only python3.10. I changed sagetex in my overlay to be PYTHON_COMPAT=( python3_{8..10} ) and that seems to be the last bit needed to build only against python3.10.

kiwifb commented 2 years ago

I have pushed that too https://github.com/cschwan/sage-on-gentoo/commit/739b16bd623ec4d64e97d1c35987a4b14f1edcf4 how come you didn't get it?

strogdon commented 2 years ago

I'm wrong. There is something else. I can't just do

=sci-mathematics/sage-9999 -python_targets_python3_9

with PYTHON_TARGETS="python3_9 python3_10" Is this normal?

kiwifb commented 2 years ago

sage_docbuild requires sage with matching pythons as PDEPEND.

kiwifb commented 2 years ago

I think it would be best to try PYTHON_TARGETS=python3_10 emerge -1v @sagemath

strogdon commented 2 years ago

Relative to commits. I believe you fixed sagetex-3.6 but not sagetex-3.5-r1 which is required for sage-9999.

kiwifb commented 2 years ago

Darn, yes. Another oversight. I don't believe there is any reason for that.

kiwifb commented 2 years ago

OK, sagetex 3.5 PYTHON_COMPAT bumped. I'll have to check the reason the update to 3.6 is stalled in vanilla.

strogdon commented 2 years ago

Yes, even

=sci-mathematics/sage-9999 -python_targets_python3_9
=sci-mathematics/sage_docbuild-9999 -python_targets_python3_9

will not work with PYTHON_TARGETS="python3_9 python3_10" in make.conf. It is simply ignored. PYTHON_TARGETS must be set in the emerge.

strogdon commented 2 years ago

508 packages to build. I hope my hard drive is up for the task.

kiwifb commented 2 years ago

I don't have PYTHON_TARGETS in make.conf anymore. I have /etc/portage/package.use/python which looks like

*/* PYTHON_TARGETS: -* python3_9 python3_10

which suggests how to structure package.use files for selective python. The alternative would be to use env and package.env files.

strogdon commented 2 years ago

Thanks for the pointers. This seems to work

=sci-mathematics/sage-9999 PYTHON_TARGETS: -* python3_10
=sci-mathematics/sage_docbuild-9999 PYTHON_TARGETS: -* python3_10
=sci-mathematics/sage_setup-9999 PYTHON_TARGETS: -* python3_10
kiwifb commented 2 years ago

Nice to know it does.

strogdon commented 2 years ago

sbcl will not build on my new Prefix (https://bugs.gentoo.org/837746). clisp does build. Any downside of using clisp instead of sbcl in building maxima for Sage?

kiwifb commented 2 years ago

None. So long as ecls works there are no issues. My own maxima install is ecls only.

strogdon commented 2 years ago

OK, I try the ecls only approach. I'm not sure what's up with sbcl.

kiwifb commented 2 years ago

Always been a funny one sbcl. You need sbcl to bootstrap sbcl. There is probably an architecture confusion on prefix.

strogdon commented 2 years ago

I noticed that.

strogdon commented 2 years ago

Sage finally built on the Prefix using only python3.10. To document things, I had the following build issues with (solutions)

The main issue - to build Sage with just python3.10 has succeeded. Thanks for the assistance.