Files
MINGW-packages/mingw-w64-ffmpeg-python/PKGBUILD
Christoph Reiter bd08ada171 Use pypi PURLs instead of plain pypi names
This allows us to include a version and we already use PURL
for other things, so might as well remove the pypi special case.

Normalize the names, since that is required for PURLs.
2025-02-17 09:02:11 +01:00

61 lines
2.2 KiB
Bash

# Maintainer: Sarah Ottinger <schalaalexiazeal@gmail.com>
_realname=ffmpeg-python
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=0.2.0
pkgrel=6
pkgdesc='Python bindings for FFmpeg - with complex filtering support (mingw-w64)'
provides=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
replaces=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://github.com/kkroening/ffmpeg-python"
msys2_references=(
'aur: python-ffmpeg'
'purl: pkg:pypi/ffmpeg-python'
)
license=('Apache')
depends=("${MINGW_PACKAGE_PREFIX}-python-future" "${MINGW_PACKAGE_PREFIX}-ffmpeg")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest-mock")
makedepends=("unzip" "${MINGW_PACKAGE_PREFIX}-python-setuptools")
options=('!emptydirs')
source=("${_realname}-${pkgver}.zip::https://github.com/kkroening/ffmpeg-python/archive/${pkgver}.zip"
"0001-remove-unused-pytest-runner-dep.patch")
sha256sums=('0a6229ddcccff36dc199f877d2a06b00c2e2f7dee774233aae5e932c0ccdabf2'
'31b5cc3d17cf35f3ebc760cd0fbc95594580ffa36b5e93b21fdd2ef99fb49b45')
noextract=("${_realname}-${pkgver}.zip") # bsdtar chokes on README symlink, we need unzip
prepare() {
cd "$srcdir"
unzip "${_realname}-${pkgver}.zip"
cd "${_realname}-${pkgver}"
patch -Np1 -i ../0001-remove-unused-pytest-runner-dep.patch
cd "$srcdir"
rm -rf python-build-${MSYSTEM} | true
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
}
build() {
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python setup.py build
}
check() {
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
--root="$PWD/tmp_install" --optimize=1 --skip-build
${MINGW_PREFIX}/bin/pytest
}
package() {
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}