diff options
author | Mark Wagie | 2022-02-27 11:29:32 -0700 |
---|---|---|
committer | Mark Wagie | 2022-02-27 11:29:32 -0700 |
commit | 540be2cc13bfcc9f5a5aac7845e7622b11ec77d5 (patch) | |
tree | b0bd2d907aaaf0a55de4c3fc70adb24d9b1cd500 /PKGBUILD | |
parent | 440fee9ca6912a537e717858b418cffc3f0789a1 (diff) | |
download | aur-540be2cc13bfcc9f5a5aac7845e7622b11ec77d5.tar.gz |
use standards based build
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -8,24 +8,27 @@ pkgname=python-pychromecast _name=PyChromecast pkgver=10.2.3 -pkgrel=1 +pkgrel=2 pkgdesc='Library for Python 3 to communicate with the Google Chromecast' arch=('any') url="https://github.com/home-assistant-libs/pychromecast" license=('MIT') depends=('python-protobuf' 'python-zeroconf' 'python-casttube') -makedepends=('python-setuptools') +makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel') source=("https://pypi.org/packages/source/${_name:0:1}/$_name/$_name-$pkgver.tar.gz") sha256sums=('ddb86c5acdc13e8bdadd2b7f5738fda36b32c1750548f7b629ca8d178f05e0da') build() { cd "$_name-$pkgver" - python setup.py build + python -m build --wheel --no-isolation } package() { cd "$_name-$pkgver" - python setup.py install --root="$pkgdir" --optimize=1 --skip-build + python -m installer --destdir="$pkgdir" dist/*.whl - install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" + # Move license to proper directory + local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + install -d "$pkgdir/usr/share/licenses/$pkgname" + mv "${pkgdir}${site_packages}/$_name-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/" } |