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

Kyle Keen kkeen at archlinux.org
Tue Aug 21 03:20:04 UTC 2018


    Date: Tuesday, August 21, 2018 @ 03:20:04
  Author: kkeen
Revision: 372943

upgpkg: python-entrypoints 0.2.3-3  split with python2-entrypoints

Modified:
  python-entrypoints/trunk/PKGBUILD

----------+
 PKGBUILD |   35 ++++++++++++++++++++++++++++-------
 1 file changed, 28 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-08-21 01:42:08 UTC (rev 372942)
+++ PKGBUILD	2018-08-21 03:20:04 UTC (rev 372943)
@@ -1,10 +1,11 @@
 # $Id$
 # Maintainer: Kyle Keen <keenerd at gmail.com>
 
-pkgname=python-entrypoints
+pkgbase=python-entrypoints
+pkgname=(python-entrypoints python2-entrypoints)
 _name=entrypoints
 pkgver=0.2.3
-pkgrel=2
+pkgrel=3
 pkgdesc="Discover and load entry points from installed packages."
 arch=('any')
 url="https://github.com/takluyver/entrypoints"
@@ -11,17 +12,30 @@
 #url="https://pypi.python.org/pypi/entrypoints"
 license=('MIT')
 depends=('python')
+makedepends=('python' 'python2-setuptools')
 #makedepends=('python-pip')
-# both sources because the WHL doesn't come with a license
+# 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/py2.py3/e/$_name/$_name-$pkgver-py2.py3-none-any.whl")
+        "https://files.pythonhosted.org/packages/py2.py3/e/$_name/$_name-$pkgver-py2.py3-none-any.whl"
+        "$pkgname-pypi-$pkgver.tgz::https://pypi.io/packages/source/e/$_name/$_name-$pkgver.tar.gz")
 md5sums=('ad31adbe634709555c400de125098dc8'
-         'c33be165b1307ff873212a9fbcb0c015')
+         'c33be165b1307ff873212a9fbcb0c015'
+         '0d3ad1b0130d91e3596ef3a59f25a56c')
 
-# py2 version needs 'configparser'
+prepare() {
+  cd "$srcdir"
+  cp -a entrypoints-$pkgver py2entrypoints-$pkgver
+}
 
-package() {
+build() {
+  cd py2entrypoints-$pkgver
+  python2 setup.py build
+}
+
+package_python-entrypoints() {
   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.7/site-packages/entrypoints.py"
@@ -35,3 +49,10 @@
   install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 
+package_python2-entrypoints() {
+  depends=('python2-configparser')
+  cd py2entrypoints-$pkgver
+  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
+  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+



More information about the arch-commits mailing list