1
0
mirror of https://github.com/bertptrs/aur.git synced 2025-12-25 12:40:30 +01:00

upgpkg: python-plotly 5.20.0-4

Reinstate the JS build. Using a cheeky patch that overwrites part of a
dependency, we can get the memory usage down to something more
reasonable. With this, there's no more reason to avoid building the JS
extensions.
This commit is contained in:
2024-04-08 18:22:17 +02:00
parent 84d2321629
commit c6309566e5
3 changed files with 4764 additions and 5 deletions

View File

@@ -1,13 +1,14 @@
pkgbase = python-plotly
pkgdesc = An open-source, interactive graphing library
pkgver = 5.20.0
pkgrel = 3
pkgrel = 4
url = https://github.com/plotly/plotly.py
arch = any
license = MIT
checkdepends = python-requests
checkdepends = python-pytest
makedepends = git
makedepends = npm
makedepends = python-wheel
makedepends = python-build
makedepends = python-installer
@@ -32,6 +33,8 @@ pkgbase = python-plotly
options = !strip
options = !debug
source = python-plotly::git+https://github.com/plotly/plotly.py#tag=v5.20.0
source = js-build.patch
sha256sums = b0e4718894929e788aa5823d999f18246997dc256d94adc51e26b205c318ef50
sha256sums = 347d8de2ed5c6529a0113086780ecdd0b21c0a167fa60a890ca18bbac0d99392
pkgname = python-plotly

View File

@@ -3,7 +3,7 @@
pkgname=python-plotly
pkgver=5.20.0
pkgrel=3
pkgrel=4
pkgdesc="An open-source, interactive graphing library"
arch=('any')
url="https://github.com/plotly/plotly.py"
@@ -29,6 +29,7 @@ optdepends=(
)
makedepends=(
git
npm
python-wheel
python-build
python-installer
@@ -43,14 +44,17 @@ checkdepends=(
)
source=(
"${pkgname}::git+https://github.com/plotly/plotly.py#tag=v$pkgver"
"js-build.patch"
)
sha256sums=('b0e4718894929e788aa5823d999f18246997dc256d94adc51e26b205c318ef50')
sha256sums=('b0e4718894929e788aa5823d999f18246997dc256d94adc51e26b205c318ef50'
'347d8de2ed5c6529a0113086780ecdd0b21c0a167fa60a890ca18bbac0d99392')
options=(!strip !debug) # strip and debug aren't useful for python files and take forever
prepare() {
cd python-plotly/packages/python/plotly
cd python-plotly
git clean -dfx
patch -p1 < ../js-build.patch
}
build() {
@@ -58,7 +62,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 +75,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"
}

4747
python-plotly/js-build.patch Normal file

File diff suppressed because it is too large Load Diff