[arch-commits] Commit in python-flufl.i18n/trunk (PKGBUILD)

David Runge dvzrv at gemini.archlinux.org
Wed Jun 29 22:19:16 UTC 2022


    Date: Wednesday, June 29, 2022 @ 22:19:16
  Author: dvzrv
Revision: 1241578

upgpkg: python-flufl.i18n 4.0-1: Upgrade to 4.0.

Remove unnecessary quotes and curly braces.
Switch to PEP517 using python-pdm-pep517.

Modified:
  python-flufl.i18n/trunk/PKGBUILD

----------+
 PKGBUILD |   53 ++++++++++++++++++++++++-----------------------------
 1 file changed, 24 insertions(+), 29 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-06-29 22:18:55 UTC (rev 1241577)
+++ PKGBUILD	2022-06-29 22:19:16 UTC (rev 1241578)
@@ -2,43 +2,38 @@
 
 _name=flufl.i18n
 pkgname=python-flufl.i18n
-pkgver=3.2
-pkgrel=3
+pkgver=4.0
+pkgrel=1
 pkgdesc="A high level API for internationalization"
-arch=('any')
+arch=(any)
 url="https://gitlab.com/warsaw/flufl.i18n"
-license=('Apache')
-depends=('python-atpublic')
-makedepends=('python-setuptools')
-checkdepends=('python-sybil' 'python-pytest')
-provides=('python-flufl-i18n')
-replaces=('python-flufl-i18n')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
-sha512sums=('07f329d026f24db623045f3c9857bcaacc1f0982066d4409fc060c4f712716044f96321a4e4909cbc85932f36fc76f71b9d118662ba837fd85b22754ce2d25c7')
-b2sums=('dc827eb4099670c6e5c39ebc8702fcda146b20a3978fa56108ab98a05d2c8911e705b71dacd6b9fc7fae9923d009487f6f047baa0dcd06a5de2e4f4d5fafc465')
+license=(Apache)
+depends=(python-atpublic)
+makedepends=(python-build python-installer python-pdm-pep517)
+checkdepends=(python-sybil python-pytest)
+provides=(python-flufl-i18n)
+replaces=(python-flufl-i18n)
+source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
+sha512sums=('03e953af7e406d24a64d334647008e222cf74e5e055865638a52d8ec7e25edae44046aa4dfa8766b5a1458b335e9e29bd8b3e89703d8c8b28ab777375da19712')
+b2sums=('6bd4a311c3df56b03a0d46164f7f1ee1eeeb257478a82515261894f4cdf3017b150f1e13ce95a08f50ed5e01cf736884c7ba05a96e3f6b90917418ed18462753')
 
-prepare() {
-  mv -v "${_name}-$pkgver" "$pkgname-$pkgver"
-  cd "$pkgname-$pkgver"
-  # we don't need code coverage during tests
-  sed -e '/addopts/d' -i setup.cfg
-}
-
 build() {
-  cd "$pkgname-$pkgver"
-  python setup.py build
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
 }
 
 check() {
-  cd "$pkgname-$pkgver"
-  export PYTHONPATH="build:${PYTHONPATH}"
-  pytest -v
+  local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+
+  cd $_name-$pkgver
+  # install to temporary location, as importlib is used
+  python -m installer --destdir=test_dir dist/*.whl
+  export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
+  pytest -vv -c /dev/null
 }
 
 package() {
-  cd "$pkgname-$pkgver"
-  python setup.py install --skip-build \
-                          --optimize=1 \
-                          --root="${pkgdir}"
-  install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"
 }



More information about the arch-commits mailing list