[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Fri Jun 19 20:07:06 UTC 2020


    Date: Friday, June 19, 2020 @ 20:07:06
  Author: felixonmars
Revision: 389548

addpkg: python-csv23 0.3.2-1

Added:
  python-csv23/
  python-csv23/repos/
  python-csv23/trunk/
  python-csv23/trunk/PKGBUILD

----------+
 PKGBUILD |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

Added: python-csv23/trunk/PKGBUILD
===================================================================
--- python-csv23/trunk/PKGBUILD	                        (rev 0)
+++ python-csv23/trunk/PKGBUILD	2020-06-19 20:07:06 UTC (rev 389548)
@@ -0,0 +1,49 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-csv23
+pkgname=(python-csv23 python2-csv23)
+pkgver=0.3.2
+pkgrel=1
+pkgdesc="Python 2/3 unicode CSV compatibility layer"
+url="https://github.com/xflr6/csv23"
+license=('MIT')
+arch=('any')
+makedepends=('python-setuptools' 'python2-setuptools' 'python2-mock')
+checkdepends=('python-pytest' 'python2-pytest' 'python-mock' 'python-pytest-mock' 'python2-pytest-mock')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/xflr6/csv23/archive/v$pkgver.tar.gz")
+sha512sums=('289386cce5de4ae5bc42fc56d1639bbd1483034e5422f63142c1d188de735b1f5f18f9f69e3cb96f4ac3e1d7d0b371b1c45e720982c4f4b539fcf0d2da893f6a')
+
+prepare() {
+  cd csv23-$pkgver
+  sed -i '/--cov/d' setup.cfg
+}
+
+build() {
+  cd csv23-$pkgver
+  python setup.py build
+  python2 setup.py build
+}
+
+check() {
+  cd csv23-$pkgver
+  python -m pytest
+  python2 -m pytest
+}
+
+package_python-csv23() {
+  depends=('python')
+
+  cd csv23-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+
+  install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+}
+
+package_python2-csv23() {
+  depends=('python2-mock')
+
+  cd csv23-$pkgver
+  python2 setup.py install --root="$pkgdir" --optimize=1
+
+  install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+}


More information about the arch-commits mailing list