Make available a sage-env script

This script is used by the cantor sagemath backend.
  Other issues with the cantor sagemath backend were reported at
https://bugs.kde.org/show_bug.cgi?id=411645
[Make sagemath backend compatible with sagemath built with python3]
https://bugs.kde.org/show_bug.cgi?id=411646
[Please consider adding a configuration to use local sagemath documentation]
This commit is contained in:
pcpa 2019-09-06 17:36:22 -03:00
parent abd2cf0873
commit e4003eb1b4

View file

@ -1314,9 +1314,7 @@ popd
%endif
#------------------------------------------------------------------------
cat > %{buildroot}%{_bindir}/sage << EOF
#!/bin/bash -i
cat > %{buildroot}%{SAGE_LOCAL}/bin/sage-env << EOF
export CUR=\$PWD
##export DOT_SAGE="\$HOME/.sage"
mkdir -p \$DOT_SAGE/{maxima,sympow,tmp}
@ -1345,6 +1343,11 @@ export SYMPOW_DIR="\$DOT_SAGE/sympow"
# Required for sage -gdb
: \${SAGE_DEBUG:=no}
export SAGE_DEBUG
EOF
cat > %{buildroot}%{_bindir}/sage << EOF
#!/bin/bash -i
source $SAGE_LOCAL/bin/sage-env
exec $SAGE_LOCAL/bin/sage "\$@"
EOF
#------------------------------------------------------------------------
@ -1438,7 +1441,9 @@ perl -pi -e 's|%{buildroot}||g;' \
%endif
# Script was used to build documentation
perl -pi -e 's|%{buildroot}||g;s|^##||g;' %{buildroot}%{_bindir}/sage
perl -pi -e 's|%{buildroot}||g;s|^##||g;' \
%{buildroot}%{_bindir}/sage \
%{buildroot}%{SAGE_LOCAL}/bin/sage-env
#------------------------------------------------------------------------
# Fix links