mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
58 lines
1.4 KiB
Bash
58 lines
1.4 KiB
Bash
# Contribution from Arch:
|
|
# Contributor: Sebastian Wiesner <lunaryorn googlemail com>
|
|
# Contributor: Igor Ramos Tiburcio <irtigor@yahoo.com.br>
|
|
|
|
pkgbase=python-py
|
|
pkgname=('python2-py' 'python3-py')
|
|
pkgver=1.5.2
|
|
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=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/py/archive/$pkgver.tar.gz")
|
|
sha256sums=('c1a23fb4c6cc181dbb207117190adefcad757e742c2a25ba8fed63bd55712634')
|
|
|
|
prepare() {
|
|
cp -a py-$pkgver{,-py2}
|
|
|
|
export LC_CTYPE=en_US.UTF-8
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir"/py-$pkgver
|
|
python3 setup.py build
|
|
|
|
cd "$srcdir"/py-$pkgver-py2
|
|
python2 setup.py build
|
|
}
|
|
|
|
check() {
|
|
# Known failure: https://github.com/pytest-dev/py/issues/104
|
|
|
|
cd "$srcdir"/py-$pkgver
|
|
python3 setup.py pytest || warning "Tests failed"
|
|
|
|
cd "$srcdir"/py-$pkgver-py2
|
|
python2 setup.py pytest || warning "Tests failed"
|
|
}
|
|
|
|
package_python3-py() {
|
|
depends=('python3')
|
|
|
|
cd py-$pkgver
|
|
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
|
|
}
|
|
|