[arch-commits] Commit in python-deprecation/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Sat Jun 9 16:35:53 UTC 2018
Date: Saturday, June 9, 2018 @ 16:35:52
Author: felixonmars
Revision: 342178
archrelease: copy trunk to community-testing-any
Added:
python-deprecation/repos/community-testing-any/
python-deprecation/repos/community-testing-any/PKGBUILD
(from rev 342177, python-deprecation/trunk/PKGBUILD)
----------+
PKGBUILD | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
Copied: python-deprecation/repos/community-testing-any/PKGBUILD (from rev 342177, python-deprecation/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2018-06-09 16:35:52 UTC (rev 342178)
@@ -0,0 +1,53 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-deprecation
+pkgname=('python-deprecation' 'python2-deprecation')
+pkgver=2.0.3
+pkgrel=1
+pkgdesc="A library to handle automated deprecations"
+arch=('any')
+license=('Apache')
+url="http://deprecation.readthedocs.io"
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python2-unittest2')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/briancurtin/deprecation/archive/$pkgver.tar.gz")
+sha512sums=('1499e6ecbd92831890d927c73992e58a83536cc7abb907c25b82638a204ee6ce13ecf175ac94be86c4cdee425b07571b0c711b8ec81016f11adc18a616398f7e')
+
+prepare() {
+ cp -a deprecation-$pkgver{,-py2}
+
+ sed -i 's/unittest2/unittest/g' deprecation-$pkgver/tests/*.py
+
+ export LC_CTYPE=en_US.UTF-8
+}
+
+build() {
+ cd "$srcdir"/deprecation-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/deprecation-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/deprecation-$pkgver
+ python -m unittest discover
+
+ cd "$srcdir"/deprecation-$pkgver-py2
+ python2 -m unittest discover
+}
+
+package_python-deprecation() {
+ depends=('python')
+
+ cd deprecation-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+}
+
+package_python2-deprecation() {
+ depends=('python2')
+
+ cd deprecation-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+}
More information about the arch-commits
mailing list