desktop/python-virtualenv/PKGBUILD
AlmAck 17bb03e88f python-pytest 3.2.3
added new checkdeps
2017-10-22 14:42:58 +02:00

47 lines
1.4 KiB
Bash

pkgbase=python-virtualenv
pkgname=('python3-virtualenv' 'python2-virtualenv')
pkgver=15.1.0
pkgrel=1
pkgdesc="Virtual Python Environment builder"
url="https://virtualenv.pypa.io/"
arch=('any')
license=('MIT')
makedepends=('python3' 'python2')
replaces=('virtualenv')
conflicts=('virtualenv')
source=("https://pypi.io/packages/source/v/virtualenv/virtualenv-$pkgver.tar.gz")
md5sums=('44e19f4134906fe2d75124427dc9b716')
sha256sums=('02f8102c2436bb03b3ee6dede1919d1dac8a427541652e5ec95171ec8adbc93a')
package_python3-virtualenv() {
depends=('python3')
cd "$srcdir/virtualenv-$pkgver"
LANG='en_US.UTF-8' python3 setup.py build
LANG='en_US.UTF-8' python3 setup.py install --prefix=/usr --root="$pkgdir"
# link to a version with 3 suffix as well
ln "$pkgdir/usr/bin/virtualenv" "$pkgdir/usr/bin/virtualenv3"
install -D -m644 LICENSE.txt \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_python2-virtualenv() {
depends=('python2')
cd "$srcdir/virtualenv-$pkgver"
# should report this upstream as still not fixed...
sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" virtualenv.py
python2 setup.py build
python2 setup.py install --prefix=/usr --root="$pkgdir"
# move this "old" version out of the way
mv "$pkgdir/usr/bin/virtualenv" "$pkgdir/usr/bin/virtualenv2"
install -D -m644 LICENSE.txt \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}