summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a45a936e5bb9e52b347b4ba93b0ad94fc31e37cd (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
# Maintainer:  Vitalii Kuzhdin <vitaliikuzhdin@gmail.com>

pkgname="euporie"
pkgver=2.8.2
pkgrel=1
pkgdesc="Jupyter notebooks in the terminal"
arch=('any')
url="https://${pkgname}.readthedocs.io"
_url="https://github.com/joouha/${pkgname}"
license=('MIT')
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-hatchling')
checkdepends=('python-pytest' 'python-pytest-asyncio')
depends=(
  # from pyproject.toml
  'python>=3.8' 'python-prompt_toolkit' 'python-pygments' 'jupyter-nbformat'
  'python-jupyter-client>=7.1' 'python-aenum' 'python-typing_extensions'
  'python-fastjsonschema' 'python-platformdirs' 'python-pyperclip'
  'python-imagesize' 'python-markdown-it-py' 'python-linkify-it-py'
  'python-mdit_py_plugins' 'python-flatlatex' 'python-timg'
  'python-pillow>=9.0' 'python-sixelcrop' 'python-universal_pathlib'
  'python-fsspec' 'python-jupytext>=1.14.0'
  # from namcap
  'python-jupyter-core' 'python-ipykernel' 'python-rich' 'python-mtable'
  'python-sympy' 'python-numpy' 'python-img2unicode' 'python-html2text'
  'python-magic' 'python-matplotlib' 'python-cairosvg' 'python-aiohttp'
  'python-ziamath' 'python-chafapy' 'python-teimpy' 'python-pylatexenc')
optdepends=('python-asyncssh: for Euporie hub support')
_pkgsrc="${pkgname}-${pkgver}"
source=("${_pkgsrc}.tar.gz::${_url}/archive/v${pkgver}.tar.gz")
sha256sums=('3a3c67bb3a998189b7b738158878eb2e31acda5e7d8063a4e90380207b0f3946')

build () {
  cd "${srcdir}/${_pkgsrc}"
  python -m build --wheel --no-isolation
}

check () {
  cd "${srcdir}/${_pkgsrc}"
  pytest
}

package () {
  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")

  cd "${srcdir}/${_pkgsrc}"
  python -m installer --destdir="${pkgdir}" dist/*.whl

  install -Dm644 "README.rst"   "${pkgdir}/usr/share/doc/${pkgname}/README.rst"
  install -d "${pkgdir}/usr/share/licenses/${pkgname}"
  ln -s "${pkgdir}${site_packages}/${_pkgsrc}.dist-info/licenses/LICENSE" \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}