mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 12:54:35 +08:00
49 lines
1.1 KiB
Bash
49 lines
1.1 KiB
Bash
pkgbase=python-constantly
|
|
pkgname=('python3-constantly' 'python2-constantly')
|
|
pkgver=15.1.0
|
|
pkgrel=2
|
|
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
|
|
}
|