blob: da276307009748bf1627954d1a25ae1a696f6376 (
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
|
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: Simon Legner <Simon.Legner@gmail.com>
_base=pydub
pkgname=python-${_base}
pkgver=0.25.1
pkgrel=6
pkgdesc="Manipulate audio with a simple and easy high level interface"
url="https://github.com/jiaaro/${_base}"
license=(MIT)
arch=(any)
depends=(python-audioop-lts ffmpeg)
makedepends=(python-build python-installer python-setuptools python-wheel)
checkdepends=(python-pytest)
optdepends=('python-pyaudio: for playback'
'python-simpleaudio: for playback'
'python-scipy: for filters support')
# 'python-audio: alternative for audioop' opus
source=(${_base}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz
removewarnings.patch::${url}/pull/504.patch)
sha512sums=('8c3fb3714c4b0aed37ba7ab6727776bf4cd7568c1f5060cf43c30ede8da2ce4b498fb83326daa19ef44635250d552295407289c3945681e028eedde1b2b418e0'
'de0bfb193768aab0d4fa986c128eefeb741f8b38bfc1899e3f646ccc43f4b1dbd75e17e706d2277651e79e087cdefb8feb4771856c3214553dee0c9c0ab71e06')
prepare() {
cd ${_base}-${pkgver}
# Remove warnings
patch -p1 -i ../removewarnings.patch
}
build() {
cd ${_base}-${pkgver}
python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd ${_base}-${pkgver}
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
test-env/bin/python -m pytest test/test.py \
-k 'not from_file_clean_fail and not split_on_silence_complete_silence'
}
package() {
cd ${_base}-${pkgver}
PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
|