desktop/python-py/PKGBUILD
2014-09-06 18:06:09 +00:00

56 lines
1.5 KiB
Bash

# Maintainer: UtG <utg[dot]chakra.linux[at]gmail[dot]com>
# Contributor: aur2ccr (http://ddg.gg/?q=!ccr+aur2ccr)
# Contributor: Sebastian Wiesner <lunaryorn googlemail com>
# Contributor: Igor Ramos Tiburcio <irtigor@yahoo.com.br>
pkgbase=python-py
pkgname=('python2-py' 'python3-py')
pkgver=1.4.24
pkgrel=1
pkgdesc="Python rapid development tools"
arch=('any')
license=('MIT')
url="http://pylib.readthedocs.org/en/latest/"
makedepends=("python2-setuptools" "python3-setuptools" )
checkdepends=('python2-pytest' 'python3-pytest')
source=("http://pypi.python.org/packages/source/p/py/py-$pkgver.tar.gz")
sha512sums=('f62a6e962ff1ebab484725f37825cf07d730c182b7558dddf9ffe7fba7bc068748eb39952adf290fb4029989d4df1f0da1e17d4a5d7c8c509b7c82697d1e1c7c')
prepare() {
cp -r py-${pkgver}{,-py3}
cp -r py-${pkgver}{,-py2}
}
build() {
cd "$srcdir/py-${pkgver}-py3"
python3 setup.py build
cd "$srcdir/py-${pkgver}-py2"
python2 setup.py build
}
check() {
cd "$srcdir/py-${pkgver}-py3"
PYTHONPATH="$PWD/build/lib:$PYTHONPATH" LANG=en_US.utf8 py.test
cd "$srcdir/py-${pkgver}-py2"
PYTHONPATH="$PWD/build/lib:$PYTHONPATH" LANG=en_US.utf8 py.test2
}
package_python3-py() {
depends=('python3')
cd py-${pkgver}-py3
python3 setup.py install --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
package_python2-py() {
depends=('python2')
cd py-${pkgver}-py2
python2 setup.py install --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}