Add Education category to the desktop file (bz 1624545).

Improve jupyter integration (bz 1663165).
Move existing jupyter integration into the notebook subpackage.
Require python-jupyter-filesystem instead of owning its directories.
Drop one more remnant of the F24 to F25 upgrade fixup.
This commit is contained in:
Jerry James 2019-01-19 09:00:30 -07:00
parent 55beead27c
commit 936e17f51f

View file

@ -87,7 +87,7 @@
Name: sagemath Name: sagemath
Summary: A free open-source mathematics software system Summary: A free open-source mathematics software system
Version: 8.5 Version: 8.5
Release: 1%{?dist} Release: 2%{?dist}
# The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file
# Additionally, every $files section has a comment with the license name # Additionally, every $files section has a comment with the license name
# before files with that license # before files with that license
@ -652,6 +652,7 @@ This package contains the Turkish %{name} documentation.
%package notebook %package notebook
Summary: The Sage Notebook Summary: The Sage Notebook
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python-jupyter-filesystem
%description notebook %description notebook
The Sage Notebook is a web-based graphical user interface for The Sage Notebook is a web-based graphical user interface for
@ -1447,7 +1448,7 @@ Exec=sage
Icon=%{name} Icon=%{name}
Terminal=true Terminal=true
Type=Application Type=Application
Categories=Science;Math; Categories=Education;Science;Math;
EOF EOF
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
@ -1540,6 +1541,18 @@ chmod +x %{buildroot}%{SAGE_LOCAL}/bin/sage-list-packages
# Byte compile python files in nonstandard places # Byte compile python files in nonstandard places
%py_byte_compile %{__python3} %{buildroot}%{_texmf_main}/tex/latex/sagetex %py_byte_compile %{__python3} %{buildroot}%{_texmf_main}/tex/latex/sagetex
#------------------------------------------------------------------------
# Jupyter integration
mkdir -p %{buildroot}%{_datadir}/jupyter/kernels/sagemath
pushd %{buildroot}%{_datadir}/jupyter/kernels/sagemath
ln -s %{_docdir}/%{name}/html/en doc
ln -s %{SAGE_ETC}/notebook-ipython/logo-64x64.png logo-64x64.png
ln -s %{SAGE_ETC}/notebook-ipython/logo.svg logo.svg
cat > kernel.json << EOF
{"display_name": "SageMath %{version}", "argv": ["%{_bindir}/sage", "--python", "-m", "sage.repl.ipython_kernel", "-f", "{connection_file}"]}
EOF
popd
# last install command # last install command
rm -fr $DOT_SAGE rm -fr $DOT_SAGE
@ -1600,14 +1613,6 @@ rm -fr $DOT_SAGE
%if %{with bundled_ipywidgets} %if %{with bundled_ipywidgets}
%{SAGE_PYTHONPATH}/ipywidgets %{SAGE_PYTHONPATH}/ipywidgets
%endif %endif
%if %{with bundled_widgetsnbextension}
%dir %{_sysconfdir}/jupyter
%dir %{_sysconfdir}/jupyter/nbconfig
%dir %{_sysconfdir}/jupyter/nbconfig/notebook.d
%config(noreplace) %{_sysconfdir}/jupyter/nbconfig/notebook.d/*.json
%{_datadir}/jupyter/
%{python3_sitelib}/widgetsnbextension*
%endif
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%files data %files data
@ -1744,7 +1749,6 @@ rm -fr $DOT_SAGE
%{python3_sitearch}/sagenb/data/json %{python3_sitearch}/sagenb/data/json
# Symbolic link to $_jsdir/mathjax # Symbolic link to $_jsdir/mathjax
%{python3_sitearch}/sagenb/data/mathjax %{python3_sitearch}/sagenb/data/mathjax
%ghost %{python3_sitearch}/sagenb/data/mathjax.rpmmoved
# Empty (do not run doctests flag file) # Empty (do not run doctests flag file)
%{python3_sitearch}/sagenb/data/nodoctest.py* %{python3_sitearch}/sagenb/data/nodoctest.py*
# BSD # BSD
@ -1787,6 +1791,12 @@ rm -fr $DOT_SAGE
%lang(pt_BR) %{python3_sitearch}/sagenb/translations/pt_BR %lang(pt_BR) %{python3_sitearch}/sagenb/translations/pt_BR
%lang(ru_RU) %{python3_sitearch}/sagenb/translations/ru_RU %lang(ru_RU) %{python3_sitearch}/sagenb/translations/ru_RU
%lang(uk_UA) %{python3_sitearch}/sagenb/translations/uk_UA %lang(uk_UA) %{python3_sitearch}/sagenb/translations/uk_UA
%if %{with bundled_widgetsnbextension}
%config(noreplace) %{_sysconfdir}/jupyter/nbconfig/notebook.d/*.json
%{_datadir}/jupyter/nbextensions/
%{python3_sitelib}/widgetsnbextension*
%endif
%{_datadir}/jupyter/kernels/sagemath/
#------------------------------------------------------------------------ #------------------------------------------------------------------------
%files notebook-export %files notebook-export
@ -1816,6 +1826,13 @@ rm -fr $DOT_SAGE
######################################################################## ########################################################################
%changelog %changelog
* Sat Jan 19 2019 Jerry James <loganjerry@gmail.com> - 8.5-2
- Add Education category to the desktop file (bz 1624545)
- Improve jupyter integration (bz 1663165)
- Move existing jupyter integration into the notebook subpackage
- Require python-jupyter-filesystem instead of owning its directories
- Drop one more remnant of the F24 to F25 upgrade fixup
* Thu Jan 17 2019 Jerry James <loganjerry@gmail.com> - 8.5-1 * Thu Jan 17 2019 Jerry James <loganjerry@gmail.com> - 8.5-1
- Update to sagemath 8.5 - Update to sagemath 8.5
- Bundle ipython again; Fedora version is too far ahead. Also have to bundle - Bundle ipython again; Fedora version is too far ahead. Also have to bundle