# Maintainer: zoorat # Maintainer: Amin Vakil # Contributor: txtsd # Contributor: Tim Schumacher # Contributor: Felix Yan # Contributor: Gordian Edenhofer pkgname=python-spotdl pkgver=4.2.5 pkgrel=1 pkgdesc='Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).' arch=('any') url='https://github.com/spotDL/spotify-downloader' # url='https://spotdl.readthedocs.io/en/latest/' license=('MIT') # https://github.com/spotDL/spotify-downloader/blob/master/pyproject.toml depends=( 'ffmpeg' 'python' 'python-bandcamp-api' 'python-beautifulsoup4' 'python-dacite' 'python-demjson3' 'python-fastapi' 'python-mutagen' 'python-platformdirs' 'python-pydantic' 'python-pykakasi' 'python-pytube' 'python-rapidfuzz' 'python-requests' 'python-rich' 'python-soundcloud-v2' 'python-slugify' 'python-spotipy' 'python-syncedlyrics' 'python-typing-extensions' 'python-ytmusicapi' 'uvicorn' 'yt-dlp' ) makedepends=('python-build' 'python-installer' 'python-wheel' 'python-poetry-core') checkdepends=('python-pytest-asyncio') provides=("$pkgname" 'spotdl') options=(strip emptydirs zipman) # source=("https://pypi.io/packages/source/s/spotdl/spotdl-$pkgver.tar.gz") source=("https://github.com/spotDL/spotify-downloader/archive/refs/tags/v$pkgver.zip") b2sums=('fa0f99038c252c635e4c23dd14f8d528b443a4e5d2713c330c53a98495de02047f68e965e89183cdc40e3a413c79b0d94507b0ae428248a42b5fdfd8e2fa4081') # Document: https://wiki.archlinux.org/title/Python_package_guidelines build() { cd spotify-downloader-$pkgver # https://github.com/python-poetry/poetry/issues/5547 python -m build --wheel --no-isolation } check() { cd spotify-downloader-$pkgver pytest || echo 'Tests failed!' } package() { cd spotify-downloader-$pkgver python -m installer --destdir="$pkgdir" dist/*.whl install -vDm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }