From a5cc950304aeb4d706d9061b0583504adb9f5739a741a6cf7e3282d13aac9f92 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Thu, 26 Jun 2025 13:27:47 +0000 Subject: [PATCH] Accepting request 1288674 from home:dgarcia:branches:devel:languages:python:jupyter - Build javascript in the package with node_modules.tar.gz, generated locally from package.json and create_node_modules.sh - Update to 0.12.45 (CVE-2025-5889, bsc#1244347) * feat: add Figure.get_svg_data similar to get_png_data * Backport PR #1644: fix: save_png doesn't work when character \xa0 is used * fix: ascent is now in scipy.datasets instead of scipy.misc * chore: prettier on ScatterGL * fix: after animation, update once without animation for range issue * perf: no need to do an animation if duration is 0 OBS-URL: https://build.opensuse.org/request/show/1288674 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-bqplot?expand=0&rev=44 --- bqplot-0.12.43-gh.tar.gz | 3 -- bqplot-0.12.43.tar.gz | 3 -- bqplot-0.12.45-gh.tar.gz | 3 ++ create_node_modules.sh | 8 +++ node_modules.tar.xz | 3 ++ package.json | 112 +++++++++++++++++++++++++++++++++++++++ python-bqplot.changes | 13 +++++ python-bqplot.spec | 25 ++++++--- 8 files changed, 156 insertions(+), 14 deletions(-) delete mode 100644 bqplot-0.12.43-gh.tar.gz delete mode 100644 bqplot-0.12.43.tar.gz create mode 100644 bqplot-0.12.45-gh.tar.gz create mode 100644 create_node_modules.sh create mode 100644 node_modules.tar.xz create mode 100644 package.json diff --git a/bqplot-0.12.43-gh.tar.gz b/bqplot-0.12.43-gh.tar.gz deleted file mode 100644 index 0689f60..0000000 --- a/bqplot-0.12.43-gh.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5847e8c727ce0bc05ca40f76c8a36aa669d3028b598811ed45cf755f71e353d0 -size 7273423 diff --git a/bqplot-0.12.43.tar.gz b/bqplot-0.12.43.tar.gz deleted file mode 100644 index 32b1637..0000000 --- a/bqplot-0.12.43.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2b469d1f03df4f51873cb0406a24b56cdf4a835fc5aa9560776fc636b8b3449 -size 1205434 diff --git a/bqplot-0.12.45-gh.tar.gz b/bqplot-0.12.45-gh.tar.gz new file mode 100644 index 0000000..1133056 --- /dev/null +++ b/bqplot-0.12.45-gh.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c22202875b39693af74bf360d0a82a8414dcd6aba6401f619270212e14610ec2 +size 7537075 diff --git a/create_node_modules.sh b/create_node_modules.sh new file mode 100644 index 0000000..2e9fe10 --- /dev/null +++ b/create_node_modules.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# +# Script to create node_modules.tar.xz +# needs bower, webpack and webpack-cli installed + +jlpm install +jlpm run build +tar cJf node_modules.tar.xz node_modules diff --git a/node_modules.tar.xz b/node_modules.tar.xz new file mode 100644 index 0000000..442625f --- /dev/null +++ b/node_modules.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac2b05f55e4df4a91651ba2a5f3cac889743ba803df90fdac2f75c8b54e77318 +size 31979380 diff --git a/package.json b/package.json new file mode 100644 index 0000000..c81abc6 --- /dev/null +++ b/package.json @@ -0,0 +1,112 @@ +{ + "name": "bqplot", + "version": "0.5.46", + "description": "bqplot", + "keywords": [ + "jupyter", + "jupyterlab", + "jupyterlab notebook", + "jupyterlab-extension" + ], + "author": { + "name": "BQPlot Development team", + "email": "bqplot@bloomberg.net" + }, + "license": "Apache-2.0", + "main": "lib/index.js", + "repository": { + "type": "git", + "url": "https://github.com/bloomberg/bqplot.git" + }, + "scripts": { + "build": "jlpm run build:css && jlpm run build:js && jlpm run build:labextension && webpack --mode=production", + "build:css": "lessc less/bqplot.less css/bqplot.css", + "build:js": "tsc", + "build:labextension": "jupyter labextension build .", + "watch": "npm-run-all -p watch:*", + "watch:js": "tsc --watch", + "watch:nbextension": "webpack --watch --mode=development", + "watch:labextension": "jupyter labextension watch .", + "prepare": "jlpm run build", + "test": "karma start --single-run", + "prettify": "yarn prettier --write .", + "lint": "eslint . --ext .ts --fix" + }, + "devDependencies": { + "@jupyter-widgets/base-manager": "^1.0.0", + "@jupyter-widgets/controls": "^5", + "@jupyterlab/builder": "^4.0.0", + "@types/chai": "^4.1.7", + "@types/d3": "^5.7.2", + "@types/expect.js": "^0.3.29", + "@types/mocha": "^7.0.2", + "@types/node": "^13.13.2", + "@types/sinon": "^9.0.0", + "chai": "^4.1.2", + "css-loader": "^5.0.0", + "eslint": "^7.22.0", + "eslint-config-prettier": "^8.1.0", + "eslint-config-standard": "^16.0.2", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-promise": "^4.2.1", + "karma": "^6.3.14", + "karma-chai": "^0.1.0", + "karma-chrome-launcher": "^3.1.0", + "karma-mocha": "^2.0.0", + "karma-mocha-reporter": "^2.2.5", + "karma-sinon": "^1.0.5", + "karma-sourcemap-loader": "^0.3.7", + "karma-typescript": "^5.0.2", + "karma-typescript-es6-transform": "^5.0.2", + "karma-webpack": "^5.0.0", + "less": "^3.8.1", + "less-loader": "^5.0.0", + "mocha": "^7.1.1", + "npm-run-all": "^4.1.3", + "prettier": "^2.2.1", + "raw-loader": "~4.0.1", + "rimraf": "^3.0.2", + "sinon": "^9.0.2", + "sinon-chai": "^3.3.0", + "style-loader": "^1.2.0", + "typescript": "~4.2.0", + "webpack": "^5", + "webpack-cli": "^3.3.12" + }, + "dependencies": { + "@jupyter-widgets/base": "^2 || ^3 || ^4 || ^5 || ^6", + "@lumino/messaging": "^1", + "@lumino/widgets": "^1", + "d3": "^5.7.0", + "d3-selection": "^1", + "is-typedarray": "^1.0.0", + "popper.js": "^1.0.0", + "three": "^0.91.0", + "topojson": "^1.6.24", + "underscore": "^1.8.3" + }, + "resolutions": { + "@jupyterlab/services": "6.4.5", + "@jupyter-widgets/base": "6.0.0", + "@types/lodash": "4.14.184" + }, + "jupyterlab": { + "extension": "lib/jupyterlab-plugin", + "webpackConfig": "webpack.lab.config.js", + "outputDir": "../share/jupyter/labextensions/bqplot", + "sharedPackages": { + "@jupyter-widgets/base": { + "bundled": false, + "singleton": true + } + } + }, + "files": [ + "dist/", + "css/", + "lib/", + "shaders/" + ] +} diff --git a/python-bqplot.changes b/python-bqplot.changes index 7ed7e61..07a5fcd 100644 --- a/python-bqplot.changes +++ b/python-bqplot.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Jun 26 12:04:55 UTC 2025 - Daniel Garcia + +- Build javascript in the package with node_modules.tar.gz, generated + locally from package.json and create_node_modules.sh +- Update to 0.12.45 (CVE-2025-5889, bsc#1244347) + * feat: add Figure.get_svg_data similar to get_png_data + * Backport PR #1644: fix: save_png doesn't work when character \xa0 is used + * fix: ascent is now in scipy.datasets instead of scipy.misc + * chore: prettier on ScatterGL + * fix: after animation, update once without animation for range issue + * perf: no need to do an animation if duration is 0 + ------------------------------------------------------------------- Thu Nov 21 18:50:49 UTC 2024 - Ben Greiner diff --git a/python-bqplot.spec b/python-bqplot.spec index 63be62b..42f95da 100644 --- a/python-bqplot.spec +++ b/python-bqplot.spec @@ -1,7 +1,7 @@ # # spec file for package python-bqplot # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ # https://github.com/bqplot/bqplot/issues/1639 %define skip_python312 1 %define skip_python313 1 -%define pyver 0.12.43 +%define pyver 0.12.45 %define jupver 0.5.44 Name: python-bqplot Version: %{pyver} @@ -27,10 +27,12 @@ Release: 0 Summary: Interactive plotting package for the Jupyter notebook License: Apache-2.0 URL: https://github.com/bqplot/bqplot -# bundled js stuff from PyPI sdist -Source0: https://files.pythonhosted.org/packages/source/b/bqplot/bqplot-%{pyver}.tar.gz -# tests from GitHub source -Source1: https://github.com/bqplot/bqplot/archive/refs/tags/%{pyver}.tar.gz#/bqplot-%{pyver}-gh.tar.gz +Source0: https://github.com/bqplot/bqplot/archive/refs/tags/%{pyver}.tar.gz#/bqplot-%{pyver}-gh.tar.gz +Source1: node_modules.tar.xz +# Script to vendor node_modules sources +Source2: create_node_modules.sh +# Copied from bqplot/js and force some "resolutions" to fix js conflicts +Source3: package.json BuildRequires: %{python_module jupyter-packaging} BuildRequires: %{python_module jupyterlab} BuildRequires: %{python_module pip} @@ -94,11 +96,18 @@ interactive Jupyter widgets. This package provides the jupyterlab extension. %prep -%setup -q -n bqplot-%{pyver} -tar -x --strip-components=1 -f %{SOURCE1} bqplot-%{pyver}/{tests,ui-tests} +%autosetup -p1 -n bqplot-%{pyver} -a1 +pushd js +mv ../node_modules . +popd rm bqplot/install.py %build +pushd js +export PATH="${PATH}:node_modules/.bin" +jlpm run build +popd +echo "IM HERE" %pyproject_wheel %install