summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 81a87662420ebc141e59322bccd3a8d7ef9c79c9 (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
60
61
62
63
64
65
66
# Maintainer: Smoolak <smoolak [at] gmail.com>.

pkgname=python-roboflow
_pkgname=roboflow
pkgver=1.2.13
pkgrel=1
pkgdesc="Official Python package for working with the Roboflow API"
arch=('any')
url="https://github.com/roboflow/roboflow-python"
license=('Apache-2.0')
depends=(
  'python'
  'python-certifi'
  'python-idna'
  'python-cycler'
  'python-kiwisolver'
  'python-matplotlib'
  'python-numpy'
  'python-opencv'
  'python-pillow'
  'python-dateutil'
  'python-dotenv'
  'python-requests'
  'python-six'
  'python-urllib3'
  'python-tqdm'
  'python-yaml'
  'python-packaging'
  'python-requests-toolbelt'
  'python-filetype'
  'python-pi-heif'
  'python-pillow-avif-plugin'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-wheel'
)
checkdepends=(
  'python-pytest'
)
source=("$pkgname-$pkgver.tar.gz::https://github.com/roboflow/roboflow-python/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('017863e73242b4c52961dad2bdc741f41bfb81d719d4769dc341b08193f70aea')

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

check() {
  cd "$_pkgname-python-$pkgver"

  # Basic import test
  PYTHONPATH="$PWD:$PYTHONPATH" python -c "import roboflow; print(roboflow.__version__)" || \
    echo "Warning: Import test failed - may need API key for full functionality"
}

package() {
  cd "$_pkgname-python-$pkgver"

  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}