summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdarnold2015-08-25 11:45:22 -0400
committerjdarnold2015-08-25 11:45:22 -0400
commita8cb24a16cc7bc24559ec57da5c3edd009f11f15 (patch)
treeac07fcdbc1a35c2e8860650d329d885674323a2e
parent3a820cf3f0eed87156a02122c5f81205950e83e0 (diff)
downloadaur-a8cb24a16cc7bc24559ec57da5c3edd009f11f15.tar.gz
add split package for python3 and python2
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD33
2 files changed, 33 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f13efbc167a..5c3e185c78c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-mechanicalsoup
pkgdesc = A Python library for automating interaction with websites
pkgver = 0.3.1
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/hickford/MechanicalSoup
arch = any
license = MIT
@@ -12,5 +12,9 @@ pkgbase = python-mechanicalsoup
source = https://github.com/hickford/MechanicalSoup/archive/v0.3.1.tar.gz
md5sums = fe5855a6a8b8e07691e29e25e4f0ef0d
+pkgname = python2-mechanicalsoup
+ depends = python2
+
pkgname = python-mechanicalsoup
+ depends = python
diff --git a/PKGBUILD b/PKGBUILD
index a3c43c35622..be9d4d3f73e 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
+}
+