The Sage distribution does not support relocation after build and also not 
DESTDIR-style staged installation.

See https://github.com/sagemath/sage/issues/36860#issuecomment-1854730246 
for the suggested method for downstream packaging of Sage.

On Saturday, December 23, 2023 at 10:13:49 AM UTC-8 Christopher Duston 
wrote:

> Ugh sorry my mistake, that's the error when running /opt/sage. The error 
> when running from SAGE_LOCAL/bin/sage is
>
> $ pwd
> /tmp/SBo/package-sage/INSTALL/bin
> $ ./sage
> ./sage: ././sage-config: /tmp/SBo/package-sage/INSTALL/bin/python3: bad 
> interpreter: No such file or directory
> ./sage: ././sage-config: /tmp/SBo/package-sage/INSTALL/bin/python3: bad 
> interpreter: No such file or directory
> ./sage: ././sage-venv-config: /tmp/SBo/package-sage/INSTALL/bin/python3: 
> bad interpreter: No such file or directory
> ./sage: /tmp/SBo/package-sage/INSTALL/bin/sage-ipython: 
> /tmp/SBo/package-sage/INSTALL/bin/python3: bad interpreter: No such file or 
> directory
> ./sage: line 310: /tmp/SBo/package-sage/INSTALL/bin/sage-ipython: Success
>
> And indeed. python3 is not in that folder - and not on my system, oops. 
> Why did this install correctly before? Ok let me try 
> --without-system-python3.
>
> Oops: That option doesn't exist any more, contrary to this page: 
> https://doc.sagemath.org/html/en/reference/spkg/python3.html
>
> So I guess I'm trying --with-system-python3=no.....
>
> On Sat, Dec 23, 2023 at 11:08 AM cdu...@gmail.com <cdu...@gmail.com> 
> wrote:
>
>> Hello,
>>         I am the maintainer for the Slackware package of SageMath. 
>> They've recently instituted a policy that all packages must be built in 
>> /tmp, which makes things tricky with Sage, as the build directory might get 
>> removed at a later point, and Sage needs that. Previously I had just built 
>> in /opt/sage, set SAGE_ROOT=/opt/sage, and it worked fine (with some work 
>> on the path). I was also building as root (--enable-build-as-root), but 
>> everything worked fine. Now I cannot do this.
>>
>> I've tried to play with --prefix=SAGE_LOCAL and --disable-editable 
>> (supposed to make a self-contained installation), but if I run 
>> SAGE_LOCAL/bin/sage I get
>>
>> $ sage
>> Traceback (most recent call last):
>>   File "/tmp/SBo/sage-10.1/src/bin/sage-ipython", line 9, in <module>
>>     from sage.misc.banner import banner
>> ModuleNotFoundError: No module named 'sage'
>>
>> That directory is the build directory (not SAGE_ROOT or SAGE_LOCAL), so 
>> something has gone wrong with the portable-ness. Possibly because I built 
>> as root, for sure.
>>
>> So is there a solution here? The installation manual does not help a lot 
>> with this, I need to build a portable installation as root - or other 
>> ideas, like how to fix the error above, where the "portable installation" 
>> points to the build directory.
>>
>> Thanks.
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "sage-devel" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/sage-devel/I6YD0rAeIKg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> sage-devel+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-devel/3d39789b-f214-42d5-8906-aa09d19e7443n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/sage-devel/3d39789b-f214-42d5-8906-aa09d19e7443n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/9c139e5f-af8c-4e0b-95bc-22ee740de342n%40googlegroups.com.

Reply via email to