summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD44
1 files changed, 36 insertions, 8 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 776f8a4cab0..f163df43183 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,53 @@
# Maintainer: Aetf <aetf at unlimitedcodeworks dot xyz>
+# Contributor: j605
# Contributor: Thomas WeiƟschuh <thomas t-8ch de>
-pkgname=python-pipsi
+pkgbase=python-pipsi
+pkgname=(python-pipsi python2-pipsi)
_name=pipsi
pkgver=0.9
-pkgrel=2
+pkgrel=3
pkgdesc='Wraps pip and virtualenv to install scripts'
arch=('any')
url='https://github.com/mitsuhiko/pipsi/'
license=('BSD')
-depends=(python-virtualenv python-click python-setuptools)
+makedepends=(python2-setuptools python-setuptools)
source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+sha256sums=('688b688cc8a7a76612c0d4d1839aaef98ece8382d4382b9d8b6f0caa65f0ed34')
+
+# this multipackage trick was copied from community/python-perf
+prepare() {
+ cp -a ${_name}-${pkgver}{,-py2}
+ sed 's|pipsi=|pipsi2=|' -i ${_name}-${pkgver}-py2/setup.py
+}
+
build() {
- cd "${srcdir}/${_name}-${pkgver}"
- python setup.py build
+ (cd "${srcdir}/${_name}-${pkgver}"
+ python setup.py build
+ )
+
+ (cd "${srcdir}/${_name}-${pkgver}-py2"
+ python2 setup.py build
+ )
}
-package() {
+package_python-pipsi() {
+ depends=(python-virtualenv python-click)
+ provides=(pipsi=${pkgver})
+ conflicts=(pipsi=${pkgver})
+
cd "${srcdir}/${_name}-${pkgver}"
- python setup.py install --root="${pkgdir}" --optimize=1
+ python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
+ install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/python-pipsi/LICENSE"
}
-sha256sums=('688b688cc8a7a76612c0d4d1839aaef98ece8382d4382b9d8b6f0caa65f0ed34')
+package_python2-pipsi() {
+ depends=(python2-virtualenv python2-click)
+ provides=(pipsi2=${pkgver})
+ conflicts=(pipsi2=${pkgver})
+
+ cd "${srcdir}/${_name}-${pkgver}-py2"
+ python2 setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
+ install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/python2-pipsi/LICENSE"
+}