The package rpms/python-nbdime.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/python-nbdime.git/commit/?id=a8324c4....
Change: +ExclusiveArch: x86_64 aarch64
Thanks.
Full change: ============
commit a8324c43016f680b539545fd54b898725a1e374e Author: Jerry James loganjerry@gmail.com Date: Thu Jun 20 14:24:58 2024 -0600
Initial RPM
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7fb8e40 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/nbdime-*-vendor.tar.xz +/nbdime-*.tar.gz diff --git a/nbdime-4.0.1-vendor-licenses.txt b/nbdime-4.0.1-vendor-licenses.txt new file mode 100644 index 0000000..736739c --- /dev/null +++ b/nbdime-4.0.1-vendor-licenses.txt @@ -0,0 +1,27 @@ +yarn run v1.22.22 +$ /tmp/node_modules/.bin/license-checker --summary +├─ MIT: 1146 +├─ ISC: 163 +├─ BSD-3-Clause: 80 +├─ Apache-2.0: 43 +├─ BSD-2-Clause: 34 +├─ (MIT OR CC0-1.0): 6 +├─ BlueOak-1.0.0: 2 +├─ UNLICENSED: 2 +├─ 0BSD: 2 +├─ (CC-BY-4.0 AND OFL-1.1 AND MIT): 1 +├─ (MIT OR Apache-2.0): 1 +├─ Python-2.0: 1 +├─ CC-BY-4.0: 1 +├─ BSD*: 1 +├─ (Apache-2.0 OR MPL-1.1): 1 +├─ (AFL-2.1 OR BSD-3-Clause): 1 +├─ Public Domain: 1 +├─ (BSD-2-Clause OR MIT OR Apache-2.0): 1 +├─ CC-BY-3.0: 1 +├─ CC0-1.0: 1 +├─ (MIT AND CC-BY-3.0): 1 +├─ Unlicense: 1 +└─ MIT*: 1 + +Done in 1.44s. diff --git a/prepare_vendor.sh b/prepare_vendor.sh new file mode 100755 index 0000000..2869e9e --- /dev/null +++ b/prepare_vendor.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +PKG_URL=$(spectool *.spec --source 0 | sed -e 's/Source0:[ ]*//g') +PKG_TARBALL=$(basename $PKG_URL) +PKG_NAME=$(rpmspec -q --queryformat="%{NAME}" *.spec --srpm | sed 's/^python-//') +PKG_VERSION=$(rpmspec -q --queryformat="%{VERSION}" *.spec --srpm) +PKG_SRCDIR="${PKG_NAME}-${PKG_VERSION}" +PKG_DIR="$PWD" +PKG_TMPDIR=$(mktemp --tmpdir -d ${PKG_NAME}-XXXXXXXX) +PKG_PATH="$PKG_TMPDIR/$PKG_SRCDIR/" + +echo "URL: $PKG_URL" +echo "TARBALL: $PKG_TARBALL" +echo "NAME: $PKG_NAME" +echo "VERSION: $PKG_VERSION" +echo "PATH: $PKG_PATH" + +cleanup_tmpdir() { + popd 2>/dev/null + rm -rf $PKG_TMPDIR + rm -rf /tmp/yarn--* +} +trap cleanup_tmpdir SIGINT + +cleanup_and_exit() { + cleanup_tmpdir + if test "$1" = 0 -o -z "$1" ; then + exit 0 + else + exit $1 + fi +} + +if [ ! -w "$PKG_TARBALL" ]; then + wget "$PKG_URL" +fi + + +mkdir -p $PKG_TMPDIR +tar -xf $PKG_TARBALL -C $PKG_TMPDIR + +cd $PKG_PATH + +export YARN_CACHE_FOLDER="$PWD/.package-cache" +echo ">>>>>> Avoid bundling fontawesome-fonts" +patch -p1 -T < $PKG_DIR/python-nbdime-unbundle-fontawesome.patch + +echo ">>>>>> Install npm modules" +yarn install +if [ $? -ne 0 ]; then + echo "ERROR: yarn install failed" + cleanup_and_exit 1 +fi + +echo ">>>>>> Help yarn be less confused" +sed -i 's/("node-fetch": )"cjs"/\1"2.7.0"/' \ + .package-cache/v*/npm-verdaccio-audit-*/node_modules/verdaccio-audit/{package,.yarn-metadata}.json + +echo ">>>>>> Package vendor files" +rm -f $PKG_DIR/${PKG_NAME}-${PKG_VERSION}-vendor.tar.xz +XZ_OPT="-9e -T$(nproc)" tar cJf $PKG_DIR/${PKG_NAME}-${PKG_VERSION}-vendor.tar.xz .package-cache +if [ $? -ne 0 ]; then + cleanup_and_exit 1 +fi + +yarn add -W license-checker +yarn license-checker --summary | sed "s#$PKG_PATH#/tmp/#g" > $PKG_DIR/${PKG_NAME}-${PKG_VERSION}-vendor-licenses.txt + +cd - + +rm -rf .package-cache node_modules +cleanup_and_exit 0 diff --git a/python-nbdime-unbundle-fontawesome.patch b/python-nbdime-unbundle-fontawesome.patch new file mode 100644 index 0000000..ec59c39 --- /dev/null +++ b/python-nbdime-unbundle-fontawesome.patch @@ -0,0 +1,57 @@ +--- nbdime-4.0.1/package-lock.json.orig 2023-11-21 02:21:22.000000000 -0700 ++++ nbdime-4.0.1/package-lock.json 2024-06-18 14:46:04.129447427 -0600 +@@ -1981,15 +1981,6 @@ + "node": ">=10.0.0" + } + }, +- "node_modules/@fortawesome/fontawesome-free": { +- "version": "5.15.4", +- "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-...", +- "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg==", +- "hasInstallScript": true, +- "engines": { +- "node": ">=6" +- } +- }, + "node_modules/@hutson/parse-repository-url": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-u...", +@@ -2885,7 +2876,6 @@ + "resolved": "https://registry.npmjs.org/@jupyterlab/application/-/application-4.0.2.tgz", + "integrity": "sha512-sFF2YJBRiJGu6Jx2PE/JRwmwuLTs9eHEoqaZGCD6H4loj8iDlCuwb26JVmbCz94QzgB00KFMYCBV6K7UWhid9g==", + "dependencies": { +- "@fortawesome/fontawesome-free": "^5.12.0", + "@jupyterlab/apputils": "^4.1.2", + "@jupyterlab/coreutils": "^6.0.2", + "@jupyterlab/docregistry": "^4.0.2", +@@ -22420,7 +22410,6 @@ + "version": "4.0.1", + "license": "BSD-3-Clause", + "dependencies": { +- "@fortawesome/fontawesome-free": "^5.12.0", + "@jupyterlab/application": "^4.0.0", + "@jupyterlab/apputils": "^4.0.0", + "@jupyterlab/cells": "^4.0.0", +--- nbdime-4.0.1/packages/webapp/package.json.orig 2023-11-21 02:21:22.000000000 -0700 ++++ nbdime-4.0.1/packages/webapp/package.json 2024-06-18 14:46:19.040231643 -0600 +@@ -12,7 +12,6 @@ + "watch": "webpack --mode=development --watch" + }, + "dependencies": { +- "@fortawesome/fontawesome-free": "^5.12.0", + "@jupyterlab/application": "^4.0.0", + "@jupyterlab/apputils": "^4.0.0", + "@jupyterlab/cells": "^4.0.0", +--- nbdime-4.0.1/packages/webapp/src/index.ts.orig 2023-11-21 02:21:22.000000000 -0700 ++++ nbdime-4.0.1/packages/webapp/src/index.ts 2024-06-18 14:47:01.231621095 -0600 +@@ -16,8 +16,8 @@ import { + } from './app/common'; + + import '@jupyterlab/notebook/style/index.js'; +-import '@fortawesome/fontawesome-free/css/all.min.css'; +-import '@fortawesome/fontawesome-free/css/v4-shims.min.css'; ++import '/usr/share/fontawesome/css/all.min.css'; ++import '/usr/share/fontawesome/css/v4-shims.min.css'; + + import '@jupyterlab/theme-light-extension/style/theme.css'; + diff --git a/python-nbdime.spec b/python-nbdime.spec new file mode 100644 index 0000000..e8a65d4 --- /dev/null +++ b/python-nbdime.spec @@ -0,0 +1,364 @@ +Name: python-nbdime +Version: 4.0.1 +Release: %autorelease +Summary: Diff and merge of Jupyter notebooks + +License: BSD-3-Clause +BuildArch: noarch +URL: https://nbdime.readthedocs.io/ +VCS: https://github.com/jupyter/nbdime +Source0: %{vcs}/archive/%{version}/nbdime-%{version}.tar.gz +# Source1 and Source2 created with ./prepare_vendor.sh +# "nodejs-packaging-bundler nbdime" fails to include '@jupyterlab/buildutils' +Source1: nbdime-%{version}-vendor.tar.xz +Source2: nbdime-%{version}-vendor-licenses.txt +Source3: prepare_vendor.sh +# Unbundle the fontawesome fonts +Patch0: %{name}-unbundle-fontawesome.patch + +# The build uses nx 16.10.0 (https://github.com/nrwl/nx), which has native +# components for x86_64 and aarch64 only. Check later releases to see if +# the nx version has rolled forward to a version that supports more +# architectures +ExclusiveArch: x86_64 aarch64 + +BuildRequires: fontawesome-fonts-web +BuildRequires: gcc-c++ +BuildRequires: git-core +BuildRequires: help2man +BuildRequires: make +BuildRequires: nodejs-devel +BuildRequires: nodejs-npm +BuildRequires: python3-devel +BuildRequires: python3-docs +BuildRequires: yarnpkg + +%global _desc %{expand: +Nbdime provides tools for diffing and merging of Jupyter notebooks. + +- nbdiff: compare notebooks in a terminal-friendly way +- nbmerge: three-way merge of notebooks with automatic conflict resolution +- nbdiff-web: shows you a rich rendered diff of notebooks +- nbmerge-web: gives you a web-based three-way merge tool for notebooks +- nbshow: present a single notebook in a terminal-friendly way} + +%description %_desc + +%package -n python3-nbdime +# The nbdime project is released under the BSD-3-Clause license. +# Bundled JavaScript has the following licenses. +# Apache-2.0: mathjax-full +# BSD-2-Clause: domelementtype, domhandler, domutils, entities +# BSD-3-Clause: @jupyterlab/*, @lumino/* +# ISC: picocolors +# MIT: @codemirror/*, @fortawesome/*, @lezer/*, alertify.js, call-bind, crelt, +# css-loader, deepmerge, define-data-property, dom-serializer, +# es-define-property, es-errors, file-saver, function-bind, get-intrinsic, +# gopd, has-property-descriptors, has-proto, has-symbols, hasown, htmlparser2, +# is-plain-object, isarray, json-stable-stringify, lib0, lodash.escape, +# minimist, nanoid, object-keys, parse-srcset, path-browserify, postcss, +# process, querystringify, requires-port, sanitize-html, set-function-length, +# style-loader, style-mod, url-parse, w3c-keyname, y-protocols, yjs +# Public Domain: jsonify +License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND LicenseRef-Fedora-Public-Domain +Summary: %{summary} +# Filesystem package for the standard Jupyter paths +Requires: python-jupyter-filesystem +# Needed to replace the bundled fonts +Requires: fontawesome-fonts-web + +Provides: npm(nbdime) = 7.0.1 +Provides: bundled(npm(@codemirror/autocomplete)) = 6.16.2 +Provides: bundled(npm(@codemirror/commands)) = 6.6.0 +Provides: bundled(npm(@codemirror/lang-cpp)) = 6.0.2 +Provides: bundled(npm(@codemirror/lang-css)) = 6.2.1 +Provides: bundled(npm(@codemirror/lang-html)) = 6.4.9 +Provides: bundled(npm(@codemirror/lang-java)) = 6.0.1 +Provides: bundled(npm(@codemirror/lang-javascript)) = 6.2.2 +Provides: bundled(npm(@codemirror/lang-json)) = 6.0.1 +Provides: bundled(npm(@codemirror/lang-markdown)) = 6.2.5 +Provides: bundled(npm(@codemirror/lang-php)) = 6.0.1 +Provides: bundled(npm(@codemirror/lang-python)) = 6.1.6 +Provides: bundled(npm(@codemirror/lang-rust)) = 6.0.1 +Provides: bundled(npm(@codemirror/lang-sql)) = 6.6.5 +Provides: bundled(npm(@codemirror/lang-wast)) = 6.0.2 +Provides: bundled(npm(@codemirror/lang-xml)) = 6.1.0 +Provides: bundled(npm(@codemirror/language)) = 6.10.2 +Provides: bundled(npm(@codemirror/legacy-modes)) = 6.4.0 +Provides: bundled(npm(@codemirror/search)) = 6.5.6 +Provides: bundled(npm(@codemirror/state)) = 6.4.1 +Provides: bundled(npm(@codemirror/view)) = 6.28.1 +Provides: bundled(npm(@jupyterlab/apputils)) = 4.3.2 +Provides: bundled(npm(@jupyterlab/cells)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/codeeditor)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/codemirror)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/coreutils)) = 6.2.2 +Provides: bundled(npm(@jupyterlab/docregistry)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/documentsearch)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/filebrowser)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/mathjax-extension)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/nbformat)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/notebook)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/observables)) = 5.2.2 +Provides: bundled(npm(@jupyterlab/outputarea)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/rendermime)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/services)) = 7.2.2 +Provides: bundled(npm(@jupyterlab/statedb)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/statusbar)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/theme-light-extension)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/toc)) = 6.2.2 +Provides: bundled(npm(@jupyterlab/translation)) = 4.2.2 +Provides: bundled(npm(@jupyterlab/ui-components)) = 4.2.2 +Provides: bundled(npm(@lezer/common)) = 1.2.1 +Provides: bundled(npm(@lezer/cpp)) = 1.1.2 +Provides: bundled(npm(@lezer/css)) = 1.1.8 +Provides: bundled(npm(@lezer/generator)) = 1.7.0 +Provides: bundled(npm(@lezer/highlight)) = 1.2.0 +Provides: bundled(npm(@lezer/html)) = 1.3.10 +Provides: bundled(npm(@lezer/java)) = 1.1.2 +Provides: bundled(npm(@lezer/javascript)) = 1.4.17 +Provides: bundled(npm(@lezer/json)) = 1.0.2 +Provides: bundled(npm(@lezer/lr)) = 1.4.1 +Provides: bundled(npm(@lezer/markdown)) = 1.3.0 +Provides: bundled(npm(@lezer/python)) = 1.1.14 +Provides: bundled(npm(@lezer/rust)) = 1.0.2 +Provides: bundled(npm(@lezer/xml)) = 1.0.5 +Provides: bundled(npm(@lumino/algorithm)) = 2.0.1 +Provides: bundled(npm(@lumino/collections)) = 2.0.1 +Provides: bundled(npm(@lumino/commands)) = 2.3.0 +Provides: bundled(npm(@lumino/coreutils)) = 2.1.2 +Provides: bundled(npm(@lumino/disposable)) = 2.1.2 +Provides: bundled(npm(@lumino/domutils)) = 2.0.1 +Provides: bundled(npm(@lumino/dragdrop)) = 2.1.4 +Provides: bundled(npm(@lumino/keyboard)) = 2.0.1 +Provides: bundled(npm(@lumino/messaging)) = 2.0.1 +Provides: bundled(npm(@lumino/polling)) = 2.1.2 +Provides: bundled(npm(@lumino/properties)) = 2.0.1 +Provides: bundled(npm(@lumino/signaling)) = 2.1.2 +Provides: bundled(npm(@lumino/virtualdom)) = 2.0.1 +Provides: bundled(npm(@lumino/widgets)) = 2.3.2 +Provides: bundled(npm(alertify.js)) = 1.0.12 +Provides: bundled(npm(call-bind)) = 1.0.7 +Provides: bundled(npm(crelt)) = 1.0.6 +Provides: bundled(npm(css-loader)) = 6.11.0 +Provides: bundled(npm(deepmerge)) = 4.3.1 +Provides: bundled(npm(define-data-property)) = 1.1.4 +Provides: bundled(npm(dom-serializer)) = 2.0.0 +Provides: bundled(npm(domelementtype)) = 2.3.0 +Provides: bundled(npm(domhandler)) = 5.0.3 +Provides: bundled(npm(domutils)) = 3.1.0 +Provides: bundled(npm(entities)) = 4.5.0 +Provides: bundled(npm(es-define-property)) = 1.0.0 +Provides: bundled(npm(es-errors)) = 1.3.0 +Provides: bundled(npm(file-saver)) = 2.0.5 +Provides: bundled(npm(function-bind)) = 1.1.2 +Provides: bundled(npm(get-intrinsic)) = 1.2.4 +Provides: bundled(npm(gopd)) = 1.0.1 +Provides: bundled(npm(has-property-descriptors)) = 1.0.2 +Provides: bundled(npm(has-proto)) = 1.0.3 +Provides: bundled(npm(has-symbols)) = 1.0.3 +Provides: bundled(npm(hasown)) = 2.0.2 +Provides: bundled(npm(htmlparser2)) = 8.0.2 +Provides: bundled(npm(is-plain-object)) = 5.0.0 +Provides: bundled(npm(isarray)) = 2.0.5 +Provides: bundled(npm(json-stable-stringify)) = 1.1.1 +Provides: bundled(npm(jsonify)) = 0.0.1 +Provides: bundled(npm(lib0)) = 0.2.94 +Provides: bundled(npm(lodash.escape)) = 4.0.1 +Provides: bundled(npm(mathjax-full)) = 3.2.2 +Provides: bundled(npm(minimist)) = 1.2.8 +Provides: bundled(npm(nanoid)) = 3.3.7 +Provides: bundled(npm(object-keys)) = 1.1.1 +Provides: bundled(npm(parse-srcset)) = 1.0.2 +Provides: bundled(npm(path-browserify)) = 1.0.1 +Provides: bundled(npm(picocolors)) = 1.0.1 +Provides: bundled(npm(postcss)) = 8.4.38 +Provides: bundled(npm(process)) = 0.11.10 +Provides: bundled(npm(querystringify)) = 2.2.0 +Provides: bundled(npm(requires-port)) = 1.0.0 +Provides: bundled(npm(sanitize-html)) = 2.12.1 +Provides: bundled(npm(set-function-length)) = 1.2.2 +Provides: bundled(npm(style-loader)) = 3.3.4 +Provides: bundled(npm(style-mod)) = 4.1.2 +Provides: bundled(npm(url-parse)) = 1.5.10 +Provides: bundled(npm(w3c-keyname)) = 2.2.8 +Provides: bundled(npm(y-protocols)) = 1.0.6 +Provides: bundled(npm(yjs)) = 13.6.18 + +%description -n python3-nbdime %_desc + +%package doc +# The content is BSD-3-Clause. Other licenses are due to Sphinx files. +# _static/basic.css: BSD-2-Clause +# _static/css/badge_only.css: MIT +# _static/css/theme.css: MIT +# _static/doctools.js: BSD-2-Clause +# _static/documentation_options.js: BSD-2-Clause +# _static/file.png: BSD-2-Clause +# _static/js/badge_only.js: MIT +# _static/js/theme.js: MIT +# _static/language_data.js: BSD-2-Clause +# _static/minus.png: BSD-2-Clause +# _static/plus.png: BSD-2-Clause +# _static/pygments.css: BSD-3-Clause +# _static/searchtools.js: BSD-2-Clause +# _static/sphinx_highlight.js: BSD-2-Clause +# genindex.html: BSD-2-Clause +# search.html: BSD-2-Clause +# searchindex.js: BSD-2-Clause +License: BSD-3-Clause AND BSD-2-Clause AND MIT +Summary: Documentation for %{name} + +%description doc +Documentation for %{name}. + +%prep +%autosetup -n nbdime-%{version} -a1 -p1 +cp -p %{SOURCE2} . + +# Remove useless shebangs +sed -i ',#!/usr/bin/env,d' \ + nbdime/diffing/directorydiff.py \ + nbdime/gitfiles.py \ + nbdime/webapp/nb_server_extension.py \ + nbdime/webapp/webutil.py + +# Fix the remaining shebangs +%py3_shebang_fix nbdime + +# Use local objects.inv for intersphinx +sed -e "s|('https://docs%5C.python%5C.org/3%5C.5', )None|\1'%{_docdir}/python3-docs/html/objects.inv'|" \ + -i docs/source/conf.py + +# Do not depend on jupyter_server_mathjax; it doesn't work in jupyterlab 4.10+ +# https://github.com/jupyter-server/jupyter_server_mathjax/issues/20 +sed -i '/jupyter_server_mathjax/d' pyproject.toml + +%generate_buildrequires +%pyproject_buildrequires -x docs,test + +%build +export LC_ALL=C.UTF-8 +export YARN_CACHE_FOLDER="$PWD/.package-cache" +export npm_config_nodedir=%{_includedir}/node +export CFLAGS='%{build_cflags} -I%{_includedir}/node' +export CXXFLAGS='%{build_cxxflags} -I%{_includedir}/node' +yarn install --offline + +%pyproject_wheel + +# Build the documentation +PYTHONPATH=$PWD make -C docs html +rm docs/build/html/.buildinfo + +%install +%pyproject_install +%pyproject_save_files -l nbdime + +# Move the configuration files to the standard Jupyter directories +mv %{buildroot}%{_prefix}%{_sysconfdir} %{buildroot}%{_sysconfdir} + +# Remove backup files +find %{buildroot}%{_datadir}/jupyter/labextensions -name *.orig -delete + +# These two files are identical +if cmp %{buildroot}%{python3_sitelib}/nbdime/tests/files/multi_cell_nb.ipynb \ + %{buildroot}%{python3_sitelib}/nbdime/webapp/testnotebooks/base.ipynb +then + rm %{buildroot}%{python3_sitelib}/nbdime/webapp/testnotebooks/base.ipynb + ln %{buildroot}%{python3_sitelib}/nbdime/tests/files/multi_cell_nb.ipynb \ + %{buildroot}%{python3_sitelib}/nbdime/webapp/testnotebooks/base.ipynb +fi + +# Add missing executable bits +chmod a+x \ + %{buildroot}%{python3_sitelib}/nbdime/tests/filters/add_helper.py \ + %{buildroot}%{python3_sitelib}/nbdime/tests/filters/noop.py \ + %{buildroot}%{python3_sitelib}/nbdime/tests/filters/strip_outputs.py \ + %{buildroot}%{python3_sitelib}/nbdime/vcs/git/diffdriver.py \ + %{buildroot}%{python3_sitelib}/nbdime/vcs/git/difftool.py \ + %{buildroot}%{python3_sitelib}/nbdime/vcs/git/mergedriver.py \ + %{buildroot}%{python3_sitelib}/nbdime/vcs/git/mergetool.py \ + %{buildroot}%{python3_sitelib}/nbdime/vcs/hg/diff.py \ + %{buildroot}%{python3_sitelib}/nbdime/vcs/hg/diffweb.py \ + %{buildroot}%{python3_sitelib}/nbdime/vcs/hg/merge.py \ + %{buildroot}%{python3_sitelib}/nbdime/vcs/hg/mergeweb.py \ + %{buildroot}%{python3_sitelib}/nbdime/webapp/nbdifftool.py \ + %{buildroot}%{python3_sitelib}/nbdime/webapp/nbdiffweb.py \ + %{buildroot}%{python3_sitelib}/nbdime/webapp/nbdimeserver.py \ + %{buildroot}%{python3_sitelib}/nbdime/webapp/nbmergetool.py \ + %{buildroot}%{python3_sitelib}/nbdime/webapp/nbmergeweb.py + +# Generate man pages +mkdir -p %{buildroot}%{_mandir}/man1 +export PYTHONPATH=%{buildroot}%{python3_sitelib} +makehelp() { + help2man -N -n "$2" --version-string='%{version}' %{buildroot}%{_bindir}/$1 \ + --no-discard-stderr -o %{buildroot}%{_mandir}/man1/$1.1 +} +makehelp git-nbdiffdriver 'A git diff driver for notebooks' +makehelp git-nbdifftool 'A git difftool plugin for notebooks' +makehelp git-nbmergedriver 'A git merge driver for notebooks' +makehelp git-nbmergetool 'A git mergetool plugin for notebooks' +makehelp hg-nbdiff 'A mercurial external differ for notebooks' +makehelp hg-nbdiffweb 'A mercurial web-based differ for notebooks' +makehelp hg-nbmerge 'A mercurial CLI merge tool for notebooks' +makehelp hg-nbmergeweb 'A mercurial web-based merge tool for notebooks' +makehelp nbdiff 'Compute the difference between two Jupyter notebooks' +makehelp nbdiff-web 'Compute the difference between two Jupyter notebooks' +makehelp nbdime 'Merge and diff tool for Jupyter notebooks' +makehelp nbmerge 'Merge two Jupyter notebooks' +makehelp nbmerge-web 'Merge two Jupyter notebooks' +makehelp nbshow 'Show a Jupyter notebook in a terminal' + +%check +# Prepare for git tests +git config --global user.email "build@fedoraproject.org" +git config --global user.name "Fedora Builder" + +# Skip tests that require a network +%pytest --ignore=nbdime/tests/test_cli_apps.py --ignore=nbdime/tests/test_web.py + +%files -n python3-nbdime -f %{pyproject_files} +%doc CHANGELOG.md README.md +%license nbdime-%{version}-vendor-licenses.txt +%{_bindir}/git-nbdiffdriver +%{_bindir}/git-nbdifftool +%{_bindir}/git-nbmergedriver +%{_bindir}/git-nbmergetool +%{_bindir}/hg-nbdiff +%{_bindir}/hg-nbdiffweb +%{_bindir}/hg-nbmerge +%{_bindir}/hg-nbmergeweb +%{_bindir}/nbdiff +%{_bindir}/nbdiff-web +%{_bindir}/nbdime +%{_bindir}/nbmerge +%{_bindir}/nbmerge-web +%{_bindir}/nbshow +%{_mandir}/man1/git-nbdiffdriver.1* +%{_mandir}/man1/git-nbdifftool.1* +%{_mandir}/man1/git-nbmergedriver.1* +%{_mandir}/man1/git-nbmergetool.1* +%{_mandir}/man1/hg-nbdiff.1* +%{_mandir}/man1/hg-nbdiffweb.1* +%{_mandir}/man1/hg-nbmerge.1* +%{_mandir}/man1/hg-nbmergeweb.1* +%{_mandir}/man1/nbdiff.1* +%{_mandir}/man1/nbdiff-web.1* +%{_mandir}/man1/nbdime.1* +%{_mandir}/man1/nbmerge.1* +%{_mandir}/man1/nbmerge-web.1* +%{_mandir}/man1/nbshow.1* +%{_datadir}/jupyter/labextensions/nbdime-jupyterlab/ +%{_datadir}/jupyter/nbextensions/nbdime/ +%config(noreplace) %{_sysconfdir}/jupyter/jupyter_notebook_config.d/nbdime.json +%config(noreplace) %{_sysconfdir}/jupyter/jupyter_server_config.d/nbdime.json +%config(noreplace) %{_sysconfdir}/jupyter/nbconfig/notebook.d/nbdime.json + +%files doc +%doc docs/build/html +%license LICENSE.md + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..ccc1cdb --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (nbdime-4.0.1-vendor.tar.xz) = c7754f82924bda9fa87ccd957d74af114c807649a820813a9e73edae664ad7a11e79a0ca26bfb68deaef121c3abc82a114a4cd95f42dc8009e6becd65a5cefbe +SHA512 (nbdime-4.0.1.tar.gz) = ba220c9dcebba5144e60cfadba9d88bc1c4f3c2932ad8f8765c41e9910e5d917a1ef1ec8adabcdd9b81d77c9e9e8e12003bdb75f1f65057c4deee47451caba4d
arch-excludes@lists.fedoraproject.org