Name: python-jupyter-server-mathjax Version: 0.2.6 Release: %autorelease Summary: MathJax resource endpoints for Jupyter Server License: BSD-3-Clause BuildArch: noarch URL: https://jupyter.org/ VCS: https://github.com/jupyter-server/jupyter_server_mathjax Source0: %{vcs}/archive/%{version}/jupyter_server_mathjax-%{version}.tar.gz # Source1 and Source2 created with ./prepare_vendor.sh Source1: jupyter-server-mathjax-%{version}-vendor.tar.xz Source2: jupyter-server-mathjax-%{version}-vendor-licenses.txt Source3: prepare_vendor.sh BuildRequires: make BuildRequires: nodejs-devel BuildRequires: nodejs-npm BuildRequires: python3-devel BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist pytest-jupyter} BuildRequires: yarnpkg Requires: mathjax %global _desc MathJax resource endpoints for Jupyter Server. %description %_desc %package -n python3-jupyter-server-mathjax Summary: %{summary} Requires: python-jupyter-filesystem %description -n python3-jupyter-server-mathjax %_desc %prep %autosetup -n jupyter_server_mathjax-%{version} -a 1 %generate_buildrequires %pyproject_buildrequires %build export YARN_CACHE_FOLDER="$PWD/.package-cache" yarn install --offline %pyproject_wheel %install %pyproject_install %pyproject_save_files jupyter_server_mathjax # Move the configuration files to where we want them mv %{buildroot}%{_prefix}%{_sysconfdir} %{buildroot}%{_sysconfdir} # Unbundle mathjax rm -rf %{buildroot}%{python3_sitelib}/jupyter_server_mathjax/static ln -s %{_datadir}/javascript/mathjax \ %{buildroot}%{python3_sitelib}/jupyter_server_mathjax/static sed -e '\,jupyter_server_mathjax/static/,d' \ -e '/static/s/%%dir //' \ -i %{pyproject_files} %check %pytest %files -n python3-jupyter-server-mathjax -f %{pyproject_files} %doc README.md %config(noreplace) %{_sysconfdir}/jupyter/jupyter_server_config.d/jupyter_server_mathjax.json %changelog %autochangelog