summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bb14480f7da82e7663e62829518b383636a57f7b (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.7.4
pkgrel=1
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=("SKIP")

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
}