Name: python-jupyter-collaboration Version: 1.0.0 Release: 1%{?dist} Summary: JupyterLab Extension enabling Real-Time Collaboration # SPDX # When updating, make sure to check the licenses via # cat third-party-licenses.json | sed -n '/licenseId/s/"licenseId": "\(.*\)",/\1/p' | sort | uniq # in jupyter_collaboration/labextension/static License: BSD-3-Clause AND MIT URL: https://jupyter.org Source: %{pypi_source jupyter_collaboration} # Upstream uses hatch-nodejs-version to set version dynamically. # We do not have that package in Fedora so we're setting # the version statically and removing the dependency. Patch: remove_hatch-nodejs-version.patch BuildArch: noarch BuildRequires: python3-devel %global _description %{expand: JupyterLab Real-Time Collaboration is a Jupyter Server Extension and JupyterLab extensions providing support for Y documents and adding collaboration UI elements in JupyterLab.} %description %_description %package -n python3-jupyter-collaboration Summary: %{summary} Requires: python-jupyter-filesystem # Bundled provides generated by: # python3 -c "import json; [print(f\"Provides: bundled(npm({p['name']})) = {p['versionInfo']}\") for p in json.load(open(\"third-party-licenses.json\"))[\"packages\"]]" # in jupyter_collaboration/labextension/static Provides: bundled(npm(@jupyter/collaboration)) = 1.0.0 Provides: bundled(npm(@jupyter/docprovider)) = 1.0.0 Provides: bundled(npm(css-loader)) = 6.7.3 Provides: bundled(npm(lib0)) = 0.2.74 Provides: bundled(npm(process)) = 0.11.10 Provides: bundled(npm(style-loader)) = 3.3.2 Provides: bundled(npm(y-protocols)) = 1.0.5 Provides: bundled(npm(y-websocket)) = 1.5.0 %description -n python3-jupyter-collaboration %_description %prep %autosetup -p1 -n jupyter_collaboration-%{version} # PACKAGE_VERSION is part of the remove_hatch-nodejs-version.patch sed -i "s/PACKAGE_VERSION/%{version}/" pyproject.toml # Remove coverage dependencies sed -e '/"coverage"/d' -e '/"pytest-cov"/d' -i pyproject.toml # Remove useless file # https://github.com/jupyterlab/jupyter_collaboration/issues/164 rm jupyter_collaboration/labextension/schemas/@jupyter/collaboration-extension/package.json.orig %generate_buildrequires %pyproject_buildrequires -x test %build %pyproject_wheel %install %pyproject_install %pyproject_save_files jupyter_collaboration install -m 0755 -p -d %{buildroot}%{_sysconfdir}/jupyter/jupyter_server_config.d mv -v %{buildroot}{%{_prefix},}%{_sysconfdir}/jupyter/jupyter_server_config.d/jupyter_collaboration.json %check %pytest %files -n python3-jupyter-collaboration -f %{pyproject_files} %doc README.md %config(noreplace) %{_sysconfdir}/jupyter/jupyter_server_config.d/jupyter_collaboration.json %{_datadir}/jupyter/labextensions/@jupyter/collaboration-extension %changelog * Thu Jun 01 2023 Lumír Balhar - 1.0.0-1 - Run tests during build * Wed May 31 2023 Dominik Nikolov - 1.0.0~a9-2 - Moved /usr/etc files to /etc * Tue May 30 2023 Dominik Nikolov - 1.0.0~a9-1 - First packaged version