diff options
author | egnappahz | 2023-05-05 12:04:08 +0200 |
---|---|---|
committer | egnappahz | 2023-05-05 12:04:08 +0200 |
commit | 13eb7b54fe66af9190b71e66a2a4f960616958e7 (patch) | |
tree | c36e4f9670f555322152e82b254dd3fe5e8f5901 | |
parent | eb6a9865e96dd1d1c0cea8abc306d9f728a295bd (diff) | |
download | aur-13eb7b54fe66af9190b71e66a2a4f960616958e7.tar.gz |
fix deprecation: implement new building/installing methods
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 21 |
2 files changed, 19 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = graphite-web pkgdesc = a Django-based web application that renders graphs and dashboards pkgver = 1.1.10 - pkgrel = 2 + pkgrel = 3 url = https://github.com/graphite-project/graphite-web/ arch = any license = Apache @@ -15,6 +15,7 @@ pkgbase = graphite-web depends = python-cairocffi depends = python-pyparsing depends = python-django + depends = python3-django-tagging optdepends = python-flask-cache: For caching optdepends = python-raven: For sentry support source = graphite-web-1.1.10.tar.gz::https://github.com/graphite-project/graphite-web/archive/1.1.10.tar.gz @@ -2,13 +2,13 @@ pkgname=graphite-web pkgver=1.1.10 -pkgrel=2 +pkgrel=3 pkgdesc="a Django-based web application that renders graphs and dashboards" url="https://github.com/graphite-project/graphite-web/" license=('Apache') depends=('python-pytz' 'python-six' 'python-flask' 'python-structlog' 'python-yaml' 'python-tzlocal' 'python-cairocffi' 'python-pyparsing' - 'python-django') + 'python-django' 'python3-django-tagging') makedepends=('python-setuptools') optdepends=('python-flask-cache: For caching' 'python-raven: For sentry support') @@ -20,7 +20,10 @@ sha256sums=('SKIP' build() { cd "$srcdir/$pkgname-$pkgver" - python setup.py build + + #Dirty fixing obselete references + find . -type f -exec sed -i 's/post-install/post_install/g' {} + + find . -type f -exec sed -i 's/readfp/read_file/g' {} + #Dirty Fixing old django references sed -i 's/url\b/re_path/g' webapp/graphite/urls.py @@ -58,11 +61,21 @@ build() { sed -i 's/django.conf.urls/django.urls/g' webapp/graphite/functions/urls.py sed -i 's/url\b/re_path/g' webapp/graphite/functions/urls.py + + python -m build --wheel } package() { cd "$srcdir/$pkgname-$pkgver" - python setup.py install --root="${pkgdir}/" --optimize=1 + + pip install --no-deps --root="$pkgdir" dist/*.whl + + #Fix dir structure + mkdir -p $pkgdir/opt/graphite/ + mv $pkgdir/usr/* $pkgdir/opt/graphite/ + mkdir -p $pkgdir/opt/graphite/webapp/graphite/ + mv $pkgdir/opt/graphite/lib/python3.11/site-packages/graphite/* $pkgdir/opt/graphite/webapp/graphite/ + mkdir -p "$pkgdir/var/lib/graphite" install -Dm0644 "$srcdir/graphite-web.service" "$pkgdir/usr/lib/systemd/system/graphite-web.service" } |