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-2

Rework sources as a git package rather than relying on tarballs, which
have repeatedly changed checksums for unknown reasons.
This commit is contained in:
2024-03-31 22:28:22 +02:00
parent c374a1b605
commit 62d0dbef64
2 changed files with 47 additions and 35 deletions

View File

@@ -1,12 +1,16 @@
pkgbase = python-plotly
pkgdesc = An open-source, interactive graphing library
pkgver = 5.20.0
pkgrel = 1
pkgrel = 2
url = https://github.com/plotly/plotly.py
arch = x86_64
arch = any
license = MIT
checkdepends = python-requests
checkdepends = python-pytest
makedepends = git
makedepends = python-wheel
makedepends = python-build
makedepends = python-installer
makedepends = python-setuptools
makedepends = python-jupyter_core
makedepends = python-tornado
@@ -26,7 +30,8 @@ pkgbase = python-plotly
optdepends = python-inflect
optdepends = python-psutil
options = !strip
source = python-plotly-5.20.0.tar.gz::https://github.com/plotly/plotly.py/archive/v5.20.0.tar.gz
sha256sums = 5f871e5ec2ec5c554210f735414f1d12031175a401cf90bbca7556501a48b1df
options = !debug
source = python-plotly::git+https://github.com/plotly/plotly.py#tag=v5.20.0
sha256sums = SKIP
pkgname = python-plotly

View File

@@ -3,9 +3,9 @@
pkgname=python-plotly
pkgver=5.20.0
pkgrel=1
pkgrel=2
pkgdesc="An open-source, interactive graphing library"
arch=('x86_64')
arch=('any')
url="https://github.com/plotly/plotly.py"
license=('MIT')
depends=(
@@ -28,6 +28,10 @@ python-inflect
python-psutil
)
makedepends=(
git
python-wheel
python-build
python-installer
python-setuptools
python-jupyter_core
python-tornado
@@ -38,25 +42,28 @@ python-requests
python-pytest
)
source=(
"${pkgname}-${pkgver}.tar.gz::https://github.com/plotly/plotly.py/archive/v${pkgver}.tar.gz"
"${pkgname}::git+https://github.com/plotly/plotly.py#tag=v$pkgver"
)
options=(!strip) # strip isn't useful for python files and takes forever
sha256sums=('5f871e5ec2ec5c554210f735414f1d12031175a401cf90bbca7556501a48b1df')
options=(!strip !debug) # strip and debug aren't useful for python files and take forever
sha256sums=('SKIP')
build() {
cd plotly.py-${pkgver}/packages/python/plotly
SKIP_NPM=1 python setup.py build
cd python-plotly/packages/python/plotly
# 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
}
check() {
cd plotly.py-${pkgver}/packages/python/plotly
cd python-plotly/packages/python/plotly
pytest plotly/tests/test_core
}
package() {
cd plotly.py-${pkgver}/packages/python/plotly
SKIP_NPM=1 python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
mv ${pkgdir}/usr/etc ${pkgdir}
cd python-plotly/packages/python/plotly
python -m installer --destdir="$pkgdir"/ dist/*.whl
mv "${pkgdir}/usr/etc" "${pkgdir}"
install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}