Package Details: python-plotly 5.22.0-1

Git Clone URL: (read-only, click to copy)
Package Base: python-plotly
Description: An open-source, interactive graphing library
Upstream URL:
Keywords: chart plot python
Licenses: MIT
Submitter: fclad
Maintainer: greyltc (bertptrs)
Last Packager: bertptrs
Votes: 39
Popularity: 0.31
First Submitted: 2015-12-07 14:53 (UTC)
Last Updated: 2024-05-01 15:39 (UTC)

Pinned Comments

bertptrs commented on 2022-09-15 16:29 (UTC) (edited on 2022-09-15 18:53 (UTC) by bertptrs)

Please don't abuse the out of date flag whenever the source checksums are incorrect. The unfortunate reality is that the upstream Github tarball changes every once in a while. I don't know why; the commit tagged doesn't change. It might be a bug in Github.

I'm working on an alternative packaging that removes the Github sources (and expensive webpack compilation) to work around the issue. In the meantime, the source checksums may be wrong sometimes. Sorry about that.

Latest Comments

1 2 3 4 5 6 .. 9 Next › Last »

aeonblue commented on 2024-04-15 00:01 (UTC)

@lahwaacz @bertptrs Thanks for your efforts, it does indeed now work for me.

lahwaacz commented on 2024-04-08 21:12 (UTC)

@bertptrs Thanks! The package works fine, let's merge jupyterlab-plotly here. I will consider maintaining this in extra when the Python 3.12 rebuild is done.

bertptrs commented on 2024-04-08 16:28 (UTC)

@lahwaacz I'm not entirely happy with it but I think I've found a solution. I hunted down this Github issue which had the cause of the performance regression, and patched the build to incorporate it.

I'm not entirely happy about how the patch file looks right now, but if I don't also patch the lockfile npm will start out reevaluating the dependencies which takes quite some time.

Can you confirm whether the package now works for you? If so we can file a deletion/merge request for jupyterlab-plotly.

lahwaacz commented on 2024-04-07 18:58 (UTC)

@bertptrs The jupyterlab-plotly package is outdated and takes the pre-built JavaScript files from PyPI, which goes against Arch packaging guidelines. Refactoring this would lead to building from the same source, but packaging different content - this should not be done from two different AUR packages, but using the "split package" feature (if at all). Anyway, the conflicting file is /etc/jupyter/nbconfig/notebook.d/jupyterlab-plotly.json which probably has no effect in the current package.

IMO it is better to build everything than providing an incomplete package. If you have doubts, you can introduce a variable in the PKGBUILD that people can easily change to disable building JavaScript if they want. But the package should provide all features by default.

bertptrs commented on 2024-04-07 18:11 (UTC)

@lahwaacz the NPM skip has been added as the webpack build takes excessive amounts of resources (upwards of 6GiB of RAM when we removed it) so I'm somewhat hesitant to bring it back, but perhaps we can make this package compatible with jupyterlab-plotly by fixing the conflict.

Could you clarify where it goes wrong?

lahwaacz commented on 2024-04-06 16:13 (UTC)

@aeonblue I think that I just figured it out:

Please let me know if it works for you :)

lahwaacz commented on 2024-04-06 11:46 (UTC) (edited on 2024-04-06 12:26 (UTC) by lahwaacz)

The following change would add the JavaScript code for JupyterLab extension to this package:

@@ -3,7 +3,7 @@

 pkgdesc="An open-source, interactive graphing library"
@@ -36,6 +36,7 @@ makedepends=(
+    npm
@@ -51,6 +52,10 @@ prepare() {
   cd python-plotly/packages/python/plotly

   git clean -dfx
+  # avoid build error from npm due to UserWarning: ValueError: Extensions require a devDependency on @jupyterlab/builder@^4.1.5, you have a dependency on 3.6.1
+  cd "$srcdir"/python-plotly/packages/javascript/jupyterlab-plotly
+  sed -i 's|"@jupyterlab/builder": "^3.0.0"|"@jupyterlab/builder": "^4.1.5"|g' package.json

 build() {
@@ -58,7 +63,7 @@ build() {

   # Skip the dependency check as the version bounds on jupyterlab are too tight
   # and don't allow 4.x, which Arch currently ships.
-  SKIP_NPM=1 python -m build --wheel --no-isolation --skip-dependency-check
+  python -m build --wheel --no-isolation --skip-dependency-check

 check() {
@@ -71,5 +76,10 @@ package() {
   python -m installer --destdir="$pkgdir"/ dist/*.whl
   mv "${pkgdir}/usr/etc" "${pkgdir}"

+  # symlink the path where static assets are installed, otherwise jupyterlab
+  # will not be able to load the extension properly
+  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+  ln -s "$site_packages"/jupyterlab_plotly/labextension/static "$pkgdir"/usr/share/jupyter/labextensions/jupyterlab-plotly/
   install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

This is needed to make interactive plotly widgets (e.g. FigureWidget) work in JupyterLab. It is also the only missing thing that jupyterlab-plotly provides (but is outdated and conflicts with this package on one file).

lahwaacz commented on 2024-03-31 20:55 (UTC)

@bertptrs Note that you can use checksums for git sources since pacman 6.1.0.

carlosal1015 commented on 2024-03-30 22:09 (UTC)

(1/1) Arming ConditionNeedsUpdate...
==> Retrieving sources...
 -> Downloading python-plotly-5.20.0.tar.gz...
 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed
 0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 29.4M    0 29.4M    0     0   9.9M      0 --:--:--  0:00:02 --:--:-- 10.2M
==> Validating source files with sha256sums...
    python-plotly-5.20.0.tar.gz ... FAILED
==> ERROR: One or more files did not pass the validity check!

xantares commented on 2024-03-27 19:34 (UTC)

hi, I think the checksum changed again