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

Antonio Rojas arojas at gemini.archlinux.org
Sat Apr 16 20:21:33 UTC 2022


    Date: Saturday, April 16, 2022 @ 20:21:32
  Author: arojas
Revision: 1186731

Rebuild, simplify, run tests, switch to PEP517

Modified:
  python-entrypoints/trunk/PKGBUILD

----------+
 PKGBUILD |   42 ++++++++++++++++++------------------------
 1 file changed, 18 insertions(+), 24 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-04-16 20:04:50 UTC (rev 1186730)
+++ PKGBUILD	2022-04-16 20:21:32 UTC (rev 1186731)
@@ -3,36 +3,30 @@
 pkgname=python-entrypoints
 _name=entrypoints
 pkgver=0.4
-pkgrel=1
+pkgrel=2
 pkgdesc="Discover and load entry points from installed packages."
 arch=('any')
 url="https://github.com/takluyver/entrypoints"
-#url="https://pypi.python.org/pypi/entrypoints"
 license=('MIT')
 depends=('python')
-makedepends=('python')
-#makedepends=('python-pip')
-# several sources because the WHL doesn't come with a license
-# and pypi version is the only one with setup.py
-source=("$pkgname-$pkgver.tgz::https://github.com/takluyver/entrypoints/archive/$pkgver.tar.gz"
-        "https://files.pythonhosted.org/packages/py3/e/$_name/$_name-$pkgver-py3-none-any.whl"
-        "$pkgname-pypi-$pkgver.tgz::https://pypi.io/packages/source/e/$_name/$_name-$pkgver.tar.gz")
-md5sums=('9d37abd7147c6b7e0af55adc95691062'
-         '1c8f717951f0d2f0125739753eda6bdc'
-         '3acd8b72119a8fb1eac7030c24ac6b49')
+makedepends=('python-build' 'python-installer' 'python-flit-core')
+checkdepends=('python-pytest')
+source=(https://github.com/takluyver/entrypoints/archive/$pkgver/$pkgname-$pkgver.tar.gz)
+sha256sums=('d2197a94aa73e70a7f60600e654ac9918ca2a0ee5480eb875296c42220a02272')
 
+build() {
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  cd $_name-$pkgver
+  pytest -v
+}
+
 package() {
-  cd "$srcdir"
-  # install is like this because of dist-info related bug report
-  # pip actually doesn't do much and is remarkably slow
-  #pip install --compile --no-deps --ignore-installed --root="$pkgdir" *.whl
-  install -Dm644 entrypoints.py "$pkgdir/usr/lib/python3.10/site-packages/entrypoints.py"
-  _dist="entrypoints-$pkgver.dist-info"
-  cd $_dist
-  for _i in ./*; do
-    install -Dm644 $_i "$pkgdir/usr/lib/python3.10/site-packages/$_dist/$_i"
-  done
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
 
-  cd "$srcdir/entrypoints-$pkgver"
-  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
 }



More information about the arch-commits mailing list