summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a0b8de69553e0032c5b62045ed142762f9416190 (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
# Maintainer: Daniel Bermond <dbermond@archlinux.org>

pkgname=nvidia-vpf
pkgver=2.0.0
pkgrel=2
pkgdesc='NVIDIA Video Processing Framework'
arch=('x86_64')
url='https://github.com/NVIDIA/VideoProcessingFramework/'
license=('Apache-2.0')
depends=('cuda' 'nvidia-utils' 'ffmpeg' 'python' 'python-numpy')
optdepends=('python-pytorch-cuda: for Torch extension (PytorchNvCodec)')
makedepends=('cmake' 'python-build' 'python-scikit-build' 'python-installer'
             'python-pytorch-cuda' 'python-setuptools' 'python-wheel')
source=("https://github.com/NVIDIA/VideoProcessingFramework/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz"
        '010-nvidia-vpf-remove-unwanted-pip-build-deps.patch')
sha256sums=('09f50b12413caa0941c116bd507bb1bd5c0716d46138db7aff941226966bd6d0'
            '1188222edb0534e9385059a31c3c4f669223435b2a400ceadd28beadab0da3c5')

prepare() {
    patch -d "VideoProcessingFramework-${pkgver}" -Np1 -i "${srcdir}/010-nvidia-vpf-remove-unwanted-pip-build-deps.patch"
}

build() {
    export CMAKE_GENERATOR='Unix Makefiles'
    
    cd "VideoProcessingFramework-${pkgver}"
    python -m build --wheel --no-isolation

    cd src/PytorchNvCodec
    python -m build --wheel --no-isolation
}

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