summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorjdarnold2015-08-25 11:45:22 -0400
committerjdarnold2015-08-25 11:45:22 -0400
commita8cb24a16cc7bc24559ec57da5c3edd009f11f15 (patch)
treeac07fcdbc1a35c2e8860650d329d885674323a2e /PKGBUILD
parent3a820cf3f0eed87156a02122c5f81205950e83e0 (diff)
downloadaur-a8cb24a16cc7bc24559ec57da5c3edd009f11f15.tar.gz
add split package for python3 and python2
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 28 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a3c43c356223..be9d4d3f73e5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,11 @@
# Maintainer: Jonathan Arnold <jdarnold@archlinux.us>
# Contributor: Zhang Hai <dreaming.in.code.zh@gmail.com>
-pkgname=python-mechanicalsoup
+_pkgname="MechanicalSoup"
+pkgbase=python-mechanicalsoup
+pkgname=('python2-mechanicalsoup' 'python-mechanicalsoup')
pkgver=0.3.1
-pkgrel=3
+pkgrel=4
pkgdesc="A Python library for automating interaction with websites"
arch=('any')
url="https://github.com/hickford/MechanicalSoup"
@@ -13,7 +15,28 @@ makedepends=('python-setuptools')
source=("https://github.com/hickford/MechanicalSoup/archive/v${pkgver}.tar.gz")
md5sums=('fe5855a6a8b8e07691e29e25e4f0ef0d')
-package() {
- cd "${srcdir}/MechanicalSoup-${pkgver}"
- python setup.py install --root="${pkgdir}/" --optimize=1
+build() {
+ cd $srcdir
+ cp -r ${_pkgname}-$pkgver ${_pkgname}2-$pkgver
}
+
+check() {
+ cd $srcdir/${_pkgname}-$pkgver
+ python3 setup.py check
+
+ cd $srcdir/${_pkgname}2-$pkgver
+ python2 setup.py check
+}
+
+package_python-mechanicalsoup() {
+ depends=('python')
+ cd $srcdir/${_pkgname}-$pkgver
+ python3 setup.py install --root "${pkgdir}" --optimize=1
+}
+
+package_python2-mechanicalsoup() {
+ depends=('python2')
+ cd $srcdir/${_pkgname}2-$pkgver
+ python2 setup.py install --root "${pkgdir}" --optimize=1
+}
+