summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 99741060017a09282ec23a65b9a78e5e3a3bb57a (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
# Maintainer:
# Contributor: Alexander F. Rødseth <xyproto@archlinux.org>

_module="diffusers"
_pkgname="python-$_module"
pkgname="$_pkgname${_pkgtype:-}"
pkgver=0.24.0
pkgrel=1
pkgdesc='Pretrained diffusion models for image and audio generation in PyTorch'
url='https://github.com/huggingface/diffusers'
license=('Apache-2.0')
arch=('any')

makedepends=(
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-wheel'
)

_pkgsrc="$_module-$pkgver"
source=("$_module-$pkgver"::"$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('148d926605782d262e512d6ba819ff3b45dad7f2e84c7f9d2a5fc0b6e793e6a7')

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

package() {
  depends+=(
    'python-pillow'
    'python-requests'
    'python-regex'
    'python-numpy'
    'python-huggingface-hub'
    'python-filelock'
    'python-importlib-metadata'
    'python-setuptools'
  )

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