diff options
author | Luis Martinez | 2022-04-03 21:32:39 -0500 |
---|---|---|
committer | Luis Martinez | 2022-04-03 21:32:39 -0500 |
commit | 1e689ee79f1a348ceec7b73de38d50bf3e9007b7 (patch) | |
tree | 3bb9d3a1cd949a2ce8bc3e591d0b7797513f1dc6 /PKGBUILD | |
parent | 1ce0c06377c3e1e99739a5016e6b30bdb0080a64 (diff) | |
download | aur-python-user_agent.tar.gz |
update to 0.1.10
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 35 |
1 files changed, 20 insertions, 15 deletions
@@ -1,30 +1,35 @@ -# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz> +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> +# Contributor: Caltlgin Stsodaat <contact@fossdaily.xyz> # Contributor: Sergey Mastykov <smastykov[at]gmail[dot]com> -_pkgname='user_agent' -pkgname="python-${_pkgname}" -pkgver=0.1.9 -pkgrel=3 +pkgname=python-user_agent +_name=user_agent +pkgver=0.1.10 +pkgrel=1 pkgdesc='Generate random, valid web user-agent headers' arch=('any') url='https://github.com/lorien/user_agent' -_url_pypi='https://pypi.org/project/user_agent' license=('MIT') depends=('python-six') -makedepends=('python-setuptools') -source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz") -sha256sums=('8f1ad46cc4aef9f99515ea1c74bb8cacc43e23074c335b2ba2db7735ebe9c0d5') +makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel') +source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/u/$_name/$_name-$pkgver.tar.gz") +sha256sums=('b86537cb2a9d3bda0e2afcc654ec15b383502836877a67520654acadf73f1723') build() { - cd "${_pkgname}-${pkgver}" - python setup.py build + cd "$_name-$pkgver" + python -m build --wheel --no-isolation } package() { - cd "${_pkgname}-${pkgver}" - python setup.py install --root="${pkgdir}" --optimize=1 --skip-build - install -Dvm644 'README.rst' -t "${pkgdir}/usr/share/doc/${pkgname}" - install -Dvm644 'LICENSE' -t "${pkgdir}/usr/share/licenses/${pkgname}" + cd "$_name-$pkgver" + PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl + install -Dm644 'README.rst' -t "${pkgdir}/usr/share/doc/${pkgname}" + + local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s \ + "$_site/$_name-$pkgver.dist-info/LICENSE" \ + "$pkgdir/usr/share/licenses/$pkgname/" } # vim: ts=2 sw=2 et: |