2017-08-16 03:59:36 +08:00
|
|
|
pkgbase=python-constantly
|
|
|
|
pkgname=('python3-constantly' 'python2-constantly')
|
|
|
|
pkgver=15.1.0
|
2017-11-20 07:04:40 +08:00
|
|
|
pkgrel=2
|
2017-08-16 03:59:36 +08:00
|
|
|
pkgdesc='Symbolic constants in Python'
|
|
|
|
arch=('any')
|
|
|
|
license=('MIT')
|
|
|
|
url='https://github.com/twisted/constantly'
|
|
|
|
makedepends=('python3-setuptools' 'python2-setuptools' 'git')
|
|
|
|
checkdepends=('python3-pytest-runner' 'python2-pytest-runner' 'python3-twisted' 'python2-twisted')
|
|
|
|
source=("git+https://github.com/twisted/constantly.git#tag=$pkgver")
|
|
|
|
md5sums=('SKIP')
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cp -a constantly{,-py2}
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$srcdir"/constantly
|
|
|
|
python3 setup.py build
|
|
|
|
|
|
|
|
cd "$srcdir"/constantly-py2
|
|
|
|
python2 setup.py build
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
cd "$srcdir"/constantly
|
|
|
|
python3 setup.py ptr
|
|
|
|
|
|
|
|
cd "$srcdir"/constantly-py2
|
|
|
|
python2 setup.py ptr
|
|
|
|
}
|
|
|
|
|
|
|
|
package_python3-constantly() {
|
|
|
|
depends=('python3')
|
|
|
|
|
|
|
|
cd constantly
|
|
|
|
python3 setup.py install --root="$pkgdir" --optimize=1
|
|
|
|
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
}
|
|
|
|
|
|
|
|
package_python2-constantly() {
|
|
|
|
depends=('python2')
|
|
|
|
|
|
|
|
cd constantly-py2
|
|
|
|
python2 setup.py install --root="$pkgdir" --optimize=1
|
|
|
|
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
}
|