From 1409c06e3115d7ec316d01b3af029b7caf7954d2 Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Thu, 1 Mar 2018 17:29:43 +0000
Subject: python-ply: update to 3.11

---
 abs/core/python_modules/python-ply/PKGBUILD    | 50 +++++++++++++++-----------
 abs/core/python_modules/python-ply/__changelog |  1 -
 2 files changed, 29 insertions(+), 22 deletions(-)
 delete mode 100644 abs/core/python_modules/python-ply/__changelog

diff --git a/abs/core/python_modules/python-ply/PKGBUILD b/abs/core/python_modules/python-ply/PKGBUILD
index 3c8cace..3b0d7d7 100644
--- a/abs/core/python_modules/python-ply/PKGBUILD
+++ b/abs/core/python_modules/python-ply/PKGBUILD
@@ -1,45 +1,53 @@
 # $Id$
-# Maintainer: Felix Yan <felixonmars@gmail.com>
+# Maintainer: Felix Yan <felixonmars@archlinux.org>
 # Contributor: Alexander Rødseth <rodseth@gmail.com>
 # Contributor: Marcin "avalan" Falkiewicz <avalatron@gmail.com>
 # Contributor: C Anthony Risinger <anthony@xtfx.me>
 
 pkgbase=python-ply
-pkgname=(python2-ply)
-pkgver=3.4
-pkgrel=4
+pkgname=(python-ply python2-ply)
+pkgver=3.11
+pkgrel=1
 pkgdesc='Implementation of lex and yacc parsing tools'
 arch=('any')
 url='http://www.dabeaz.com/ply/'
 license=('BSD')
-makedepends=('python2-setuptools')
-source=("${url}ply-$pkgver.tar.gz")
-sha256sums=('af435f11b7bdd69da5ffbc3fecb8d70a7073ec952e101764c88720cdefb2546b')
+makedepends=('python-setuptools' 'python2-setuptools')
+source=("${url}ply-$pkgver.tar.gz"
+        LICENSE)
+sha512sums=('37e39a4f930874933223be58a3da7f259e155b75135f1edd47069b3b40e5e96af883ebf1c8a1bbd32f914a9e92cfc12e29fec05cf61b518f46c1d37421b20008'
+            '5cea085a23ed260afc9084380c1d59e3942c2385089a8eb2391a89c85cde4df2ceb7eed21bb8c4d0cad5b78e59742da69e4c5c78fd0e223f5c99c56e9296a075')
 
 prepare() {
-  cp -r ${pkgbase#python-}-$pkgver{,-py2}
+  cp -a ply-$pkgver{,-py2}
 }
 
-#package_python-ply() {
-#  depends=('python')
+check() {
+  cd "ply-$pkgver/test"
+  python testlex.py
+  python testyacc.py
 
-#  cd "${pkgbase#python-}-$pkgver"
+  cd "$srcdir/ply-$pkgver-py2/test"
+  python2 testlex.py
+  python2 testyacc.py
+}
+
+package_python-ply() {
+  depends=('python')
+
+  cd "ply-$pkgver"
+  python setup.py install --root="$pkgdir"
 
-#  python setup.py install --root="$pkgdir"
-  
-#  install -d "$pkgdir/usr/share/licenses/$pkgname"
-#  head -n30 README > "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-#}
+  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
 
 package_python2-ply() {
   depends=('python2')
 
-  cd "${pkgbase#python-}-$pkgver-py2"
-
+  cd "ply-$pkgver-py2"
   python2 setup.py install --root="$pkgdir"
-  
-  install -d "$pkgdir/usr/share/licenses/$pkgname"
-  head -n30 README > "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 
 # vim:set ts=2 sw=2 et:
diff --git a/abs/core/python_modules/python-ply/__changelog b/abs/core/python_modules/python-ply/__changelog
deleted file mode 100644
index 488d3cf..0000000
--- a/abs/core/python_modules/python-ply/__changelog
+++ /dev/null
@@ -1 +0,0 @@
-PKGBUILD: rm py 3 stuff
-- 
cgit v0.12