[arch-commits] Commit in radicale/trunk (PKGBUILD)

David Runge dvzrv at gemini.archlinux.org
Tue Apr 19 07:49:40 UTC 2022


    Date: Tuesday, April 19, 2022 @ 07:49:39
  Author: dvzrv
Revision: 1187074

upgpkg: radicale 3.1.6-1: Upgrade to 3.1.6.

Remove unneeded quotes and curly braces.
Switch to PEP517.
Simplify test setup by using site-packages dir.

Modified:
  radicale/trunk/PKGBUILD

----------+
 PKGBUILD |   64 +++++++++++++++++++++++++++++++------------------------------
 1 file changed, 33 insertions(+), 31 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-04-19 07:45:49 UTC (rev 1187073)
+++ PKGBUILD	2022-04-19 07:49:39 UTC (rev 1187074)
@@ -5,67 +5,69 @@
 
 pkgname=radicale
 _name=Radicale
-pkgver=3.1.5
-pkgrel=2
+pkgver=3.1.6
+pkgrel=1
 pkgdesc="Simple calendar (CalDAV) and contact (CardDAV) server"
 arch=(any)
 url="https://radicale.org/"
 license=(GPL3)
-# setuptools is required due to use of pkg_resources:
-# https://github.com/Kozea/Radicale/issues/1184
 depends=(python-bcrypt python-dateutil python-defusedxml python-passlib
-python-setuptools python-pytz python-vobject)
+python-pytz python-vobject)
+makedepends=(python-build python-installer python-setuptools python-wheel)
 checkdepends=(python-pytest python-pytest-runner python-typeguard python-waitress)
-backup=('etc/radicale/config'
-        'etc/radicale/rights'
-        'etc/radicale/users')
-install="${pkgname}.install"
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Kozea/${pkgname}/archive/v${pkgver}.tar.gz"
-        "${pkgname}-sysusers.conf"
-        "${pkgname}-tmpfiles.conf"
-        "${pkgname}.service")
-sha512sums=('0febad350e970e4f0ef8199472bb94a81a2a412be2b55c1baee16967b39bf9a5f7b9e8aa7c95a19beedf2f8b2d871382aa0727803432575bff248bc0137adce3'
+backup=(
+  'etc/radicale/config'
+  'etc/radicale/rights'
+  'etc/radicale/users'
+)
+install=$pkgname.install
+source=(
+  $pkgname-$pkgver.tar.gz::https://github.com/Kozea/$pkgname/archive/v$pkgver.tar.gz
+  $pkgname-sysusers.conf
+  $pkgname-tmpfiles.conf
+  $pkgname.service
+)
+sha512sums=('37834be461713a157c79e2340899932e3088e091d9cf03e5d984b4729924fb9fbec755eb5ca29b68feb1982bb23f1a1c5c88870a6d4528e8ce78c51813ffa339'
             '56dffb66e018cfbf158dc5d8fe638b3cb31229945f659aae5623f219bcd1d68ddc375f1633fa8e857a9b2f50c9e05a06efce165370137d6e116a4f187466637f'
             '9d0dd88e4a34e9f97abda1785698e4b2a5e8202063deeb91b84e13c05e00b07e45b8d4d9eca09b9241b1138bbbfdc999dba0135c18f5bc0c08d65b0cd83b367b'
             '0f74a662e2eee56a89f5735e686910043ad5589b638e56a7ad3caa6d3b111cfbf1c131fe1b2ee34ce0d10d2f8a041a183f1382b1e1c9594f7e793c92161ef17a')
-b2sums=('574032fc9a4010db2de0066758093b74fb29e43c3e8f3328441c92af99827a5f4174ac3ddbc2573083642af4c68073c470ce64ae7689b537a72aa0b813b641b8'
+b2sums=('9c1adc4ee294f38e84e3f7a5b18a49879a211e6f4e36e54a4c8ac1e1c4f704f0095f462869795653988dbf2fe1665313c8af7d51bed596059aebf1168a0f6a25'
         'b3af60e144ef857e42ec672e806e9600265ab7d2ea4a75011de9ab56918a008437afdacb301df210b54424fb7ff1e9a332831c67b2e58fd6bc0a0aa1eebe8909'
         '41916d62f5e3f1060bd21db0722abe837754a4cb915af218c904dafac4b06794f8fde2e34486fb7392777b4738502f3df4c1390b835050045337585b064e23bb'
         '8d7e732bb7430428db2b60ffd8b4b1c3e85cbda4a1b900ae28d80c46a64e97ab484d9cc13aaa2582eeca4063f4e74141754f1e67769d444b08b3663f62cf8bf1')
 
 prepare() {
-  cd ${_name}-${pkgver}
+  cd $_name-$pkgver
   touch "users"
 }
 
 build() {
-  cd ${_name}-${pkgver}
-  python setup.py build
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
 }
 
 check() {
-  local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+  local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
 
-  cd ${_name}-${pkgver}
-  mkdir -vp testdir
-  python setup.py install --optimize=1 --root="testdir"
-  export PYTHONPATH="testdir/usr/lib/python${python_version}/site-packages:${PYTHONPATH}"
+  cd $_name-$pkgver
+  python -m installer --destdir=test_dir dist/*.whl
+  export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
   pytest -v -c /dev/null
 }
 
 package() {
-  cd ${_name}-${pkgver}
-  python setup.py install --optimize=1 --root="${pkgdir}"
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
   # config
-  install -vDm 644 {config,rights,users} -t "${pkgdir}/etc/${pkgname}/"
+  install -vDm 644 {config,rights,users} -t "$pkgdir/etc/$pkgname/"
   # wsgi
-  install -vDm 644 "${pkgname}.wsgi" -t "${pkgdir}/usr/share/${pkgname}/"
+  install -vDm 644 $pkgname.wsgi -t "$pkgdir/usr/share/$pkgname/"
   # systemd service
-  install -vDm 644 "../${pkgname}.service" -t "${pkgdir}/usr/lib/systemd/system/"
+  install -vDm 644 ../$pkgname.service -t "$pkgdir/usr/lib/systemd/system/"
   # sysusers.d
-  install -vDm 644 "../${pkgname}-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
+  install -vDm 644 ../$pkgname-sysusers.conf "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
   # tmpfiles.d
-  install -vDm 644 "../${pkgname}-tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
+  install -vDm 644 ../$pkgname-tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
   # docs
-  install -vDm 644 {CHANGELOG,DOCUMENTATION,README}.md -t "${pkgdir}/usr/share/doc/${pkgname}/"
+  install -vDm 644 {CHANGELOG,DOCUMENTATION,README}.md -t "$pkgdir/usr/share/doc/$pkgname/"
 }



More information about the arch-commits mailing list