summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeifeng Yu2018-08-07 11:38:06 -0400
committerPeifeng Yu2018-08-07 11:40:35 -0400
commitd411788ad449c131800153d85f05db4664d80ebb (patch)
treeda0fb0e4c35100e71aee93a6d6c82b49e996e15c
parent22610d7728e7d5431374f02d36d0b713c51eaec3 (diff)
downloadaur-python-pipsi.tar.gz
Pick up changes from @j605
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD44
2 files changed, 49 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b48cc9881bc..51cf3b28e92 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,24 @@
pkgbase = python-pipsi
pkgdesc = Wraps pip and virtualenv to install scripts
pkgver = 0.9
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/mitsuhiko/pipsi/
arch = any
license = BSD
- depends = python-virtualenv
- depends = python-click
- depends = python-setuptools
+ makedepends = python2-setuptools
+ makedepends = python-setuptools
source = https://files.pythonhosted.org/packages/source/p/pipsi/pipsi-0.9.tar.gz
sha256sums = 688b688cc8a7a76612c0d4d1839aaef98ece8382d4382b9d8b6f0caa65f0ed34
pkgname = python-pipsi
+ depends = python-virtualenv
+ depends = python-click
+ provides = pipsi=0.9
+ conflicts = pipsi=0.9
+
+pkgname = python2-pipsi
+ depends = python2-virtualenv
+ depends = python2-click
+ provides = pipsi2=0.9
+ conflicts = pipsi2=0.9
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"
+}