summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8044c07c329619185f85d1fe4a68b091dab826e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Maintainer: Grey Christoforo <first name at last name dot net>
# Co-Maintainer: Bert Peters <bert@bertptrs.nl>

pkgname=python-plotly
pkgver=5.14.1
pkgrel=2
pkgdesc="An open-source, interactive graphing library"
arch=('x86_64')
url="https://github.com/plotly/plotly.py"
license=('MIT')
depends=(
python
python-tenacity
)
# optdepends based on optional_requirements.txt
optdepends=(
ipython
jupyterlab
python-ipywidgets
python-numpy
python-matplotlib
python-pillow
python-scipy
python-ipykernel
python-pandas
python-colorcet
python-inflect
python-psutil
)
makedepends=(
python-setuptools
python-jupyter_core
python-tornado
jupyterlab
)
checkdepends=(
python-requests
python-pytest
)
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'
            '30260d0c0ed32ce0469e0081e79509dae5c58e4e048a94e37a1ef5108af22d63')

prepare() {
  cd plotly.py-${pkgver}
  cat ../fix_for_python3.11.patch | patch -p1
}

build() {
  cd plotly.py-${pkgver}/packages/python/plotly
  SKIP_NPM=1 python setup.py build
}

check() {
  cd plotly.py-${pkgver}/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}

  install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}