Bug#972346: sagemath-common: Sagemath does not work with Cantor, sage-env binary is needed

2020-10-16 Thread Jan Kriho
Thank you for the detailed analysis.

On Fri, 16 Oct 2020 12:25:53 -0400 John Scott  wrote:
> On Friday, October 16, 2020 11:29:14 AM EDT Jan Kriho wrote:
> > The launcher scripts is dependent on sage-env binary which sets env for
> > executing further commands
> Note that even if sage-env were to be available, I don't think Cantor would be
> able to find it. It appears to invoke `sage --root` to figure out where to 
> look,
> but the output is empty.

I see, so the sage-env binary won't be called anyway.

> Cantor could be doing things in a more clean way regardless though. Instead of
> fiddling with $SAGE_ROOT in a shell script, it could use the one-liner
> sage --ipython3 -i --simple-prompt
>
> or use /usr/bin/sage --sh for the shebang in the script and call sage-ipython

This actually looks like a way better option. I have made a quick test
with it, and it looks like it works like it's supposed to. Should the
bug be reassigned to Cantor upstream?



Bug#972346: sagemath-common: Sagemath does not work with Cantor, sage-env binary is needed

2020-10-16 Thread John Scott
Control: affects -1 cantor-backend-sage
Control: summary -1 SAGE_ROOT unset + sage-env removal inhibits Cantor backend

On Friday, October 16, 2020 11:29:14 AM EDT Jan Kriho wrote:
> The launcher scripts is dependent on sage-env binary which sets env for
> executing further commands
Note that even if sage-env were to be available, I don't think Cantor would be 
able to find it. It appears to invoke `sage --root` to figure out where to 
look, 
but the output is empty. Also with sage --sh:
> sage --sh
> 
> Starting subshell with Sage environment variables set.  Don't forget to exit 
> when you are done.  Beware:
>  * Do not do anything with other copies of Sage on your system.
>  * Do not use this for installing Sage packages using "sage -i" or for
>  running "make" at Sage's root directory.  These should be done
>  outside the Sage shell.
> 
> Bypassing shell configuration files...
> 
> Note: SAGE_ROOT=

Cantor could be doing things in a more clean way regardless though. Instead of 
fiddling with $SAGE_ROOT in a shell script, it could use the one-liner
sage --ipython3 -i --simple-prompt

or use  /usr/bin/sage --sh for the shebang in the script and call sage-ipython

signature.asc
Description: This is a digitally signed message part.


Bug#972346: sagemath-common: Sagemath does not work with Cantor, sage-env binary is needed

2020-10-16 Thread Jan Kriho
Package: sagemath-common
Version: 9.2~beta12-1
Severity: normal
X-Debbugs-Cc: erbur...@gmail.com

Dear Maintainer,

Cantor is a front-end for several math SW. However recently it stopped working
for Sage with following error in the terminal:

out:  "/usr/share/cantor/sagebackend/cantor-execsage: line 13: exec: sage-
ipython: not found\r\n"

The launcher scripts is dependent on sage-env binary which sets env for
executing further commands:

```
#!/usr/bin/env bash

export SAGE_ROOT="$($1 --root)"

if [[ -f $SAGE_ROOT"/bin/sage-env" ]]; then
. "$SAGE_ROOT/bin/sage-env" >&2
elif [[ -f $SAGE_ROOT"/local/bin/sage-env" ]]; then
. "$SAGE_ROOT/local/bin/sage-env" >&2
elif [[ -f $SAGE_ROOT"/src/bin/sage-env" ]]; then
. "$SAGE_ROOT/src/bin/sage-env" >&2
fi

exec sage-ipython -i --simple-prompt
```

Please consider re-adding the binary back to the package.

Regards,

Jan Kriho



-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (950, 'testing'), (900, 'unstable'), (850, 'experimental'), (800, 
'stable'), (775, 'oldstable'), (500, 'oldoldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.8.0-2-amd64 (SMP w/4 CPU threads)
Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages sagemath-common depends on:
ii  python3  3.8.2-3

sagemath-common recommends no packages.

sagemath-common suggests no packages.

-- no debconf information