mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
62 lines
2.3 KiB
Bash
62 lines
2.3 KiB
Bash
# Maintainer: Angel Velasquez <angvp@archlinux.org>
|
|
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
|
|
|
pkgbase=python-astroid
|
|
pkgname=('python2-astroid' 'python3-astroid')
|
|
pkgver=1.6.1
|
|
pkgrel=1
|
|
pkgdesc="Useful miscellaneous modules used by Logilab projects"
|
|
arch=('any')
|
|
url="https://github.com/PyCQA/astroid"
|
|
license=('LGPL')
|
|
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-six' 'python2-six'
|
|
'python3-lazy-object-proxy' 'python2-lazy-object-proxy' 'python3-wrapt' 'python2-wrapt'
|
|
'python2-singledispatch' 'python2-enum34' 'python2-backports.functools_lru_cache')
|
|
checkdepends=('python3-dateutil' 'python2-dateutil' 'python3-pytest' 'python2-pytest' 'python3-numpy'
|
|
'python2-numpy' 'python3-nose' 'python2-nose')
|
|
source=("$pkgbase-$pkgver.tar.gz::https://github.com/PyCQA/astroid/archive/astroid-$pkgver.tar.gz")
|
|
sha512sums=('fbe1495ecd493de0341ce973046c94f2fe2783666ad4d15513ea60831d1e0f0663d3f3afdc0c37a6313eb581f333bdc75c21214b660536c92f3b5073ce0845f2')
|
|
|
|
prepare() {
|
|
cp -a astroid-astroid-$pkgver{,-py2}
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir"/astroid-astroid-$pkgver
|
|
python3 setup.py build
|
|
|
|
cd "$srcdir"/astroid-astroid-$pkgver-py2
|
|
python2 setup.py build
|
|
}
|
|
|
|
check() {
|
|
cd "$srcdir"/astroid-astroid-$pkgver
|
|
python3 -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
|
|
# https://github.com/PyCQA/astroid/issues/472
|
|
PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python3 -Wi -m unittest discover -s build/lib/astroid/tests -p "unittest*.py" -v || warning "Tests failed"
|
|
|
|
cd "$srcdir"/astroid-astroid-$pkgver-py2
|
|
PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python2 -Wi -m unittest discover -s build/lib/astroid/tests -p "unittest*.py" -v
|
|
}
|
|
|
|
package_python3-astroid() {
|
|
depends=('python3-six' 'python3-lazy-object-proxy' 'python3-wrapt')
|
|
replaces=('python3-logilab-astng')
|
|
conflicts=('python3-logilab-astng')
|
|
|
|
cd astroid-astroid-$pkgver
|
|
|
|
python3 setup.py install --optimize=1 --skip-build --prefix=/usr --root="$pkgdir"
|
|
}
|
|
|
|
package_python2-astroid() {
|
|
depends=('python2-six' 'python2-lazy-object-proxy' 'python2-wrapt' 'python2-singledispatch'
|
|
'python2-enum34' 'python2-backports.functools_lru_cache')
|
|
replaces=('python2-logilab-astng')
|
|
conflicts=('python2-logilab-astng')
|
|
|
|
cd astroid-astroid-$pkgver-py2
|
|
|
|
python2 setup.py install --optimize=1 --skip-build --prefix=/usr --root="$pkgdir"
|
|
}
|