summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 959f22b11741d32805ad65679c96693c58a32125 (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
# Python package author: Standard Ebooks <standardebooks@googlegroups.com>
# Maintainer: Tassos Natsakis <7712382@eipieq.com>
# Maintainer: Standard Ebooks <admin@standardebooks.org>
# Contributor: Claudia Pellegrino <aur ät cpellegrino.de>
pkgname=python-standardebooks
_name=tools
pkgver=2.6.3
pkgrel=3
pkgdesc="The toolset used to produce Standard Ebooks epub ebooks."
arch=(x86_64)
url="https://standardebooks.org"
license=(GPL3)
depends=(
  "java-runtime"
  "python-cairosvg"
  "python-chardet"
  "python-cssselect"
  "python-cssutils"
  "python-ftfy"
  "python-gitpython"
  "python-lxml"
  "python-natsort"
  "python-pillow"
  "python-psutil"
  "python-pyphen"
  "python-regex"
  "python-requests"
  "python-rich"
  "python-roman"
  "python-selenium"
  "python-setuptools"
  "python-smartypants"
  "python-tinycss2"
  "python-titlecase"
  "python-unidecode"
)
makedepends=("python-build" "python-installer" "python-wheel")

source=("${_name}-${pkgver}.tar.gz::https://github.com/standardebooks/tools/archive/refs/tags/${pkgver}.tar.gz")

sha512sums=("404e4dc9d77472db1ddee277fcfa86ffb4c464537bcde15147fc9a73eaff3005a413a1277546d68d63c85d534bbe40dbf82253f3d338c18ca6023c385ab1285a")

prepare() {
  # Fix `importlib_resources` deprecation
  grep -lFR --include="*.py" "importlib_resources" "${_name}-${pkgver}" \
    | xargs -r -n 1 sed -i -e "s/importlib_resources/importlib.resources/g"
}

build() {
  cd "${_name}-${pkgver}"
  python -m build --wheel --no-isolation
}

package() {
  cd "${_name}-${pkgver}"
  python -m installer --destdir="$pkgdir" dist/*.whl
}