summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d126cc2afad82910f60280f04e2a5615829772d2 (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
pkgbase='python-moviepy'
pkgname=('python-moviepy')
_module='moviepy'
pkgver='2.2.1'
pkgrel=4
pkgdesc="Video editing with Python"
url="https://zulko.github.io/moviepy/"
depends=('python' 'python-decorator' 'python-numpy' 'python-pillow' 'python-imageio' 'python-imageio-ffmpeg' 'python-proglog' 'python-dotenv')
optdepends=('ipython: display clips in Jupyter notebooks')
makedepends=('python-build' 'python-installer' 'python-setuptools')
license=('MIT')
arch=('any')
source=("${pkgname}-${pkgver}.tar.gz::https://files.pythonhosted.org/packages/source/${_module::1}/$_module/$_module-$pkgver.tar.gz")
sha256sums=('c80cb56815ece94e5e3e2d361aa40070eeb30a09d23a24c4e684d03e16deacb1')

latestver() {
    curl -fsSL "https://pypi.org/pypi/${_module}/json" | jq -r '.info.version'
}

prepare() {
    cd "${srcdir}/${_module}-${pkgver}"
    sed -i "s/^__version__ = .*/__version__ = \"${pkgver}\"/" moviepy/version.py
}

build() {
    cd "${srcdir}/${_module}-${pkgver}"
	rm -rfv "tests/"
    python -m build --wheel --no-isolation
}

package() {
    cd "${srcdir}/${_module}-${pkgver}"
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 LICENCE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}