diff options
author | Pekka Ristola | 2022-09-27 15:52:39 +0300 |
---|---|---|
committer | Pekka Ristola | 2022-09-27 15:52:39 +0300 |
commit | e0bbab55063b7b3042cda5825b79d9c061311a9d (patch) | |
tree | 605e7c99e8f1d3dcc12aec18529287d103290060 | |
parent | f120a0aa140e2c4073d5aa961ac0af6789896dc1 (diff) | |
download | aur-e0bbab55063b7b3042cda5825b79d9c061311a9d.tar.gz |
Update to 0.23.0
Change to pyproject.toml based build and build docs.
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 39 |
2 files changed, 36 insertions, 15 deletions
@@ -1,13 +1,17 @@ pkgbase = python-ytmusicapi pkgdesc = Unofficial API for YouTube Music - pkgver = 0.22.0 + pkgver = 0.23.0 pkgrel = 1 url = https://github.com/sigma67/ytmusicapi arch = any license = MIT - makedepends = python-setuptools + makedepends = python-build + makedepends = python-installer + makedepends = python-setuptools-scm + makedepends = python-sphinx + makedepends = python-wheel depends = python-requests - source = https://files.pythonhosted.org/packages/source/y/ytmusicapi/ytmusicapi-0.22.0.tar.gz - sha256sums = 099e2ea16e141e7e42f8c724417cac4ddc9d680a67f7d6f45029c5e513dbec32 + source = https://files.pythonhosted.org/packages/source/y/ytmusicapi/ytmusicapi-0.23.0.tar.gz + sha256sums = def49b1406e0c7fb8b1cdd48a1eab5b55dff6877def68c8b1712a2ef8f9b5e7f pkgname = python-ytmusicapi @@ -1,29 +1,46 @@ # Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com> # Contributor: Tim Schumacher <timschumi@gmx.de> -pkgname=python-ytmusicapi -pkgver=0.22.0 +_name=ytmusicapi +pkgname=python-$_name +pkgver=0.23.0 pkgrel=1 pkgdesc="Unofficial API for YouTube Music" arch=('any') url="https://github.com/sigma67/ytmusicapi" license=('MIT') depends=('python-requests') -makedepends=('python-setuptools') -_name=${pkgname#python-} +makedepends=( + python-build + python-installer + python-setuptools-scm + python-sphinx + python-wheel +) source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz") -sha256sums=('099e2ea16e141e7e42f8c724417cac4ddc9d680a67f7d6f45029c5e513dbec32') +sha256sums=('def49b1406e0c7fb8b1cdd48a1eab5b55dff6877def68c8b1712a2ef8f9b5e7f') + +prepare() { + cd "$_name-$pkgver" + # Relax version requirement for python-setuptools + sed -i 's/"setuptools>=65"/"setuptools"/' pyproject.toml +} build() { - cd ytmusicapi-$pkgver - python setup.py build + cd "$_name-$pkgver" + python -m build --wheel --no-isolation + make -C docs text } package() { - cd ytmusicapi-$pkgver - python setup.py install --root="$pkgdir" --optimize=1 --skip-build + cd "$_name-$pkgver" + python -m installer --destdir="$pkgdir" dist/*.whl + + install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" docs/build/text/* - install -Dvm644 'README.rst' -t "${pkgdir}/usr/share/doc/${pkgname}" - install -Dvm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE + # Symlink license file + install -d "$pkgdir/usr/share/licenses/$pkgname" + local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + ln -s "$site_packages/$_name-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname" } |