summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: efa24e6377d1c41384cd155ff0012defedca525f (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
# Maintainer: 0fflineuser <0fflineuser@cock.li>

pkgname="python-doctr"
_name="python_doctr"
pkgver=0.11.0
pkgrel=1
pkgdesc="Document Text Recognition (docTR): deep Learning for high-performance OCR on documents."
arch=('any')
url="https://pypi.org/project/python-doctr/"
license=('Apache-2.0')
provides=()
depends=(
  python
  python-opencv
  python-numpy
  python-scipy
  python-h5py
  python-opencv
  python-pyclipper
  python-shapely
  python-langdetect
  python-rapidfuzz
  python-huggingface-hub
  python-pillow
  python-defusedxml
  python-tqdm
  # AUR
  python-pypdfium2
  python-anyascii
)
optdepends=(
  python-tensorflow
  python-tensorflow-cuda
  python-pytorch
  python-torchvision
  python-onnx
  python-weasyprint
  python-matplotlib
  # AUR
  python-tf-keras
  python-tf2onnx
  python-mplcursors
)
makedepends=(python-build python-installer python-wheel)
checkdepends=()
source=("$_name-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_name::1}/${_name//-/_}/${_name//-/_}-$pkgver.tar.gz")
sha256sums=('1668491a39ce84ee75553b51cb3e45cb46c54a6d3d999adbf336dc85602643ff')

build() {
  cd "$_name-$pkgver"
  python -m build --wheel --no-isolation
}
package() {
  cd "$_name-$pkgver"
  python -m installer --prefix="/usr" --destdir="${pkgdir}" dist/*.whl
}