cschwan / sage-on-gentoo

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

threejs no longer working #785

Closed Etn40ff closed 4 months ago

Etn40ff commented 4 months ago

It looks like the new mechanism to import threejs introduced with https://github.com/sagemath/sage/commit/7dfff8b1be091468140cba0e7042ef8670e4603f breaks threejs plotting because it is not installed in one of the supported paths.

An easy fix is to move the installation path from /usr/share/sage/threejs/ to /usr/share/sage/threejs-sage

kiwifb commented 4 months ago

I thought I had dealt with it before. I think we had a discussion about the default path. Let me check a few things. In any case thanks for signalling.

kiwifb commented 4 months ago

It should work via this line https://github.com/sagemath/sage/blob/7dfff8b1be091468140cba0e7042ef8670e4603f/src/sage/features/threejs.py#L33 given that on sage-on-gentoo SAGE_SHARE is /usr/share. Can you attach the kind of error you get? Whatever it is, we should get to the bottom of it.

Etn40ff commented 4 months ago

I do not get any error at all in sage: I just get an empty browser whenever I plot something.

Figuring out this it took a while: in the browser console I got an error about THREE not being defined and I noticed that threejs.min.js is not imported; then worked my way back from there to

sage: from sage.features.threejs import Threejs
sage: Threejs().absolute_filename()
''
Etn40ff commented 4 months ago

I think that I understand why the line you point out is not working: it points to /usr/share/sage/sage/threejs rather than /usr/share/sage/threejs.

kiwifb commented 4 months ago

That would be the case in "vanilla" sage. It should not be in sage-on-gentoo and if it does it is a regression.

kiwifb commented 4 months ago

OK, I am going senile and you are right. I must have thought of things in reverse or I made a mistake at some point.

kiwifb commented 4 months ago

I must have had brain fog when it has gone in or I was thinking of a far future. https://github.com/cschwan/sage-on-gentoo/commit/3db5268745a6cfa9e9c4c7eacd4c4fc64d0cd1e0 I will restore the setting this morning.

Etn40ff commented 4 months ago

tnks

kiwifb commented 4 months ago

I have bumped sage-conf since I updated what is installed by it. It should be pulled automatically. There is a delay of up to 15mn before the gentoo mirror of the overlay is updated.

Etn40ff commented 4 months ago

LGTM

Thanks again