summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9af4afe168c04a8728c03ce47b37408636c682ff (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
# Maintainer: Astro Benzene <universebenzene at sina dot com>
_pyname=poliastro
pkgname=python-${_pyname}-doc
pkgver=0.17.0
pkgrel=1
pkgdesc="Documentation for Python poliastro module"
arch=('any')
url="http://docs.poliastro.space"
license=('MIT')
makedepends=("python-${_pyname}=${pkgver}"
             'python-sphinx-copybutton'
             'pandoc'
#            'python-pandas'
#            'python-beautifulsoup4'
#            'python-plotly>=4.0.0'
             'python-nbsphinx>=0.8.6'
             'python-sphinx-autoapi'
             'python-sphinx_rtd_theme'
             'python-sphinx-notfound-page'
             'python-sphinx-gallery'
             'python-sphinx-hoverxref'
             'python-docutils<1:0.19'
             'python-sphinx-github-role'
             'python-myst-parser'
             'python-jupytext'
#            'python-jplephem'
#            'python-tenacity'
             'python-httpx'
             'python-czml3'
             'python-sgp4'
             'python-numba>0.55.2'
             'python-llvmlite>=0.39.0')
#            'graphviz')
source=("https://github.com/poliastro/poliastro/archive/v${pkgver}.tar.gz"
        'fix_nbsphinx_errors.patch')
md5sums=('ebea4f9b1b337304eb8d3c17dcd16c9c'
         '92c9d10567556123b294c89645a5e4c8')

prepare() {
    cd ${srcdir}/${_pyname}-${pkgver}

#   patch -Np1 -i "${srcdir}/fix_nbsphinx_errors.patch"
    sed "/^github_default_org_project/a nbsphinx_allow_errors = True\nnbsphinx_timeout = -1" \
        -i docs/source/conf.py
}

build() {
    cd ${srcdir}/${_pyname}-${pkgver}/docs

    make html
}

package() {
    cd ${srcdir}/${_pyname}-${pkgver}/docs/build

    install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ../../COPYING
    install -d -m755 "${pkgdir}/usr/share/doc/${pkgname%-doc}"
    cp -a html "${pkgdir}/usr/share/doc/${pkgname%-doc}"
}