From bee8741ec205ae6a5ec258c5202b1e7af1475bf8 Mon Sep 17 00:00:00 2001 From: Grey Christoforo Date: Wed, 17 May 2023 19:45:09 -0600 Subject: [PATCH 1/2] fix build for python 3.11. thanks getzze! --- .SRCINFO | 4 +++- .gitignore | 1 + PKGBUILD | 15 ++++++++++++--- fix_for_python3.11.patch | 38 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 fix_for_python3.11.patch diff --git a/.SRCINFO b/.SRCINFO index 1c91f9c..bd1e8bb 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = python-plotly pkgdesc = An open-source, interactive graphing library pkgver = 5.14.1 - pkgrel = 1 + pkgrel = 2 url = https://github.com/plotly/plotly.py arch = x86_64 license = MIT @@ -27,6 +27,8 @@ pkgbase = python-plotly optdepends = python-psutil options = !strip source = python-plotly-5.14.1.tar.gz::https://github.com/plotly/plotly.py/archive/v5.14.1.tar.gz + source = fix_for_python3.11.patch sha256sums = e1b58deb79a278e6ea7329c0dbcd0988d01688c101ec0d13b64f62e2ca2a8ad1 + sha256sums = 30260d0c0ed32ce0469e0081e79509dae5c58e4e048a94e37a1ef5108af22d63 pkgname = python-plotly diff --git a/.gitignore b/.gitignore index 32f0ae1..c3b7d2e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ src/ pkg/ *.tar.gz *.tar.xz +*.tar.zst diff --git a/PKGBUILD b/PKGBUILD index fd83a0a..8044c07 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ pkgname=python-plotly pkgver=5.14.1 -pkgrel=1 +pkgrel=2 pkgdesc="An open-source, interactive graphing library" arch=('x86_64') url="https://github.com/plotly/plotly.py" @@ -37,9 +37,18 @@ checkdepends=( python-requests python-pytest ) -source=("${pkgname}-${pkgver}.tar.gz::https://github.com/plotly/plotly.py/archive/v${pkgver}.tar.gz") +source=( +"${pkgname}-${pkgver}.tar.gz::https://github.com/plotly/plotly.py/archive/v${pkgver}.tar.gz" +fix_for_python3.11.patch +) options=(!strip) # strip isn't useful for python files and takes forever -sha256sums=('e1b58deb79a278e6ea7329c0dbcd0988d01688c101ec0d13b64f62e2ca2a8ad1') +sha256sums=('e1b58deb79a278e6ea7329c0dbcd0988d01688c101ec0d13b64f62e2ca2a8ad1' + '30260d0c0ed32ce0469e0081e79509dae5c58e4e048a94e37a1ef5108af22d63') + +prepare() { + cd plotly.py-${pkgver} + cat ../fix_for_python3.11.patch | patch -p1 +} build() { cd plotly.py-${pkgver}/packages/python/plotly diff --git a/fix_for_python3.11.patch b/fix_for_python3.11.patch new file mode 100644 index 0000000..fa93237 --- /dev/null +++ b/fix_for_python3.11.patch @@ -0,0 +1,38 @@ +diff --git a/packages/python/plotly/plotly/tests/test_core/test_errors/test_dict_path_errors.py b/packages/python/plotly/plotly/tests/test_core/test_errors/test_dict_path_errors.py +index 8b899a6f5..6ee06e03f 100644 +--- a/packages/python/plotly/plotly/tests/test_core/test_errors/test_dict_path_errors.py ++++ b/packages/python/plotly/plotly/tests/test_core/test_errors/test_dict_path_errors.py +@@ -402,7 +402,7 @@ template_layout_plot_bgcolor_x + print(e.args[0]) + e_substr = error_substr( + e.args[0], +- """string indices must be integers ++ """string indices must be integers, not 'str' + + Invalid value received for the 'plot_bgcolor' property of layout + +diff --git a/packages/python/plotly/setup.cfg b/packages/python/plotly/setup.cfg +index 1a82ac6f9..419173843 100644 +--- a/packages/python/plotly/setup.cfg ++++ b/packages/python/plotly/setup.cfg +@@ -1,6 +1,6 @@ + [metadata] + description_file = README.md +-license_file = LICENSE.txt ++license_files = LICENSE.txt + + [bdist_wheel] + universal=1 +diff --git a/packages/python/plotly/setup.py b/packages/python/plotly/setup.py +index 3614cb970..178f17645 100644 +--- a/packages/python/plotly/setup.py ++++ b/packages/python/plotly/setup.py +@@ -495,7 +495,6 @@ versioneer_cmds = versioneer.get_cmdclass() + setup( + name="plotly", + version=versioneer.get_version(), +- use_2to3=False, + author="Chris P", + author_email="chris@plot.ly", + maintainer="Nicolas Kruchten", + From b9f31b03c23dfb339267d2f34382d3650b824a3d Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Fri, 9 Jun 2023 13:53:33 +0200 Subject: [PATCH 2/2] upgpkg: python-plotly 5.15.0-1 upstream release Many fixes now upstreamed, tiny patch for a test remaining --- .SRCINFO | 10 +++++----- PKGBUILD | 8 ++++---- fix_for_python3.11.patch | 26 -------------------------- 3 files changed, 9 insertions(+), 35 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index bd1e8bb..b5c708d 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = python-plotly pkgdesc = An open-source, interactive graphing library - pkgver = 5.14.1 - pkgrel = 2 + pkgver = 5.15.0 + pkgrel = 1 url = https://github.com/plotly/plotly.py arch = x86_64 license = MIT @@ -26,9 +26,9 @@ pkgbase = python-plotly optdepends = python-inflect optdepends = python-psutil options = !strip - source = python-plotly-5.14.1.tar.gz::https://github.com/plotly/plotly.py/archive/v5.14.1.tar.gz + source = python-plotly-5.15.0.tar.gz::https://github.com/plotly/plotly.py/archive/v5.15.0.tar.gz source = fix_for_python3.11.patch - sha256sums = e1b58deb79a278e6ea7329c0dbcd0988d01688c101ec0d13b64f62e2ca2a8ad1 - sha256sums = 30260d0c0ed32ce0469e0081e79509dae5c58e4e048a94e37a1ef5108af22d63 + sha256sums = 919563e389d55d7324783c40cf554c4d3b66b18917b1d4bd4b44a6352405655e + sha256sums = e235e66eae73bcd8579a64a241a79fb7cad0aa94e62f45acc3ac487277282b1b pkgname = python-plotly diff --git a/PKGBUILD b/PKGBUILD index 8044c07..58e34eb 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,8 +2,8 @@ # Co-Maintainer: Bert Peters pkgname=python-plotly -pkgver=5.14.1 -pkgrel=2 +pkgver=5.15.0 +pkgrel=1 pkgdesc="An open-source, interactive graphing library" arch=('x86_64') url="https://github.com/plotly/plotly.py" @@ -42,8 +42,8 @@ source=( fix_for_python3.11.patch ) options=(!strip) # strip isn't useful for python files and takes forever -sha256sums=('e1b58deb79a278e6ea7329c0dbcd0988d01688c101ec0d13b64f62e2ca2a8ad1' - '30260d0c0ed32ce0469e0081e79509dae5c58e4e048a94e37a1ef5108af22d63') +sha256sums=('919563e389d55d7324783c40cf554c4d3b66b18917b1d4bd4b44a6352405655e' + 'e235e66eae73bcd8579a64a241a79fb7cad0aa94e62f45acc3ac487277282b1b') prepare() { cd plotly.py-${pkgver} diff --git a/fix_for_python3.11.patch b/fix_for_python3.11.patch index fa93237..578d780 100644 --- a/fix_for_python3.11.patch +++ b/fix_for_python3.11.patch @@ -10,29 +10,3 @@ index 8b899a6f5..6ee06e03f 100644 + """string indices must be integers, not 'str' Invalid value received for the 'plot_bgcolor' property of layout - -diff --git a/packages/python/plotly/setup.cfg b/packages/python/plotly/setup.cfg -index 1a82ac6f9..419173843 100644 ---- a/packages/python/plotly/setup.cfg -+++ b/packages/python/plotly/setup.cfg -@@ -1,6 +1,6 @@ - [metadata] - description_file = README.md --license_file = LICENSE.txt -+license_files = LICENSE.txt - - [bdist_wheel] - universal=1 -diff --git a/packages/python/plotly/setup.py b/packages/python/plotly/setup.py -index 3614cb970..178f17645 100644 ---- a/packages/python/plotly/setup.py -+++ b/packages/python/plotly/setup.py -@@ -495,7 +495,6 @@ versioneer_cmds = versioneer.get_cmdclass() - setup( - name="plotly", - version=versioneer.get_version(), -- use_2to3=False, - author="Chris P", - author_email="chris@plot.ly", - maintainer="Nicolas Kruchten", -