initial import
This commit is contained in:
80
python-cython/PKGBUILD
Normal file
80
python-cython/PKGBUILD
Normal file
@@ -0,0 +1,80 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgbase=python-cython
|
||||
pkgname=(python-cython tauthon-cython)
|
||||
pkgver=0.29.21
|
||||
_debver=0.29.21
|
||||
_debrel=3
|
||||
pkgrel=1
|
||||
arch=(i686 x86_64)
|
||||
url="https://cython.org"
|
||||
license=(Apache-2.0)
|
||||
makedepends=(python-setuptools tauthon-setuptools quilt)
|
||||
source=($pkgbase-$pkgver.tar.gz::"https://github.com/cython/cython/archive/$pkgver.tar.gz"
|
||||
https://deb.debian.org/debian/pool/main/c/cython/cython_$_debver-$_debrel.debian.tar.xz
|
||||
cython-hash-int-conversion.patch::"https://github.com/cython/cython/commit/28251032.patch")
|
||||
sha512sums=('2c0c3e3fff07106eb98862f71cd5dec9ff29460cf9b9e4de74537ca5e033f7523989beb5fbdc14723beaf94a535976f75c803e791b87e017961d9694b8c37679'
|
||||
'e6e897a8d54693843d7a9ef18919c5ae483488103fa472bbd088be288a454d070cc365e8a8d4610a62b43bb65cbf4fdc902558abef4326074668c15c8d394d56'
|
||||
'2c1808e73a1b520460c33bcd6b60d9a5995b72f7bb2af76d687f8a67061b8cb494bae967a79310d5917c2fb1e784a56c53becedd6639a0e44cc635063120fe48')
|
||||
|
||||
prepare() {
|
||||
cd cython-$pkgver
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
|
||||
patch -p1 -i ../cython-hash-int-conversion.patch
|
||||
|
||||
cp -r $srcdir/cython-$pkgver $srcdir/cython-$pkgver-tauthon
|
||||
find $srcdir/cython-$pkgver-tauthon -name '*.py' | xargs sed -e 's|/usr/bin/env python|/usr/bin/env tauthon|' -e 's|/usr/bin/python|/usr/bin/tauthon|' -i
|
||||
}
|
||||
|
||||
build() {
|
||||
cd cython-$pkgver
|
||||
python setup.py build
|
||||
|
||||
cd ../cython-$pkgver-tauthon
|
||||
tauthon setup.py build
|
||||
}
|
||||
|
||||
package_python-cython() {
|
||||
pkgdesc="C-Extensions for Python"
|
||||
depends=(python-setuptools)
|
||||
replaces=(cython)
|
||||
conflicts=(cython)
|
||||
provides=(cython)
|
||||
|
||||
cd cython-$pkgver
|
||||
python setup.py install --root="$pkgdir" --skip-build
|
||||
|
||||
for f in cygdb cython cythonize; do
|
||||
mv "$pkgdir"/usr/bin/$f "$pkgdir"/usr/bin/${f}3
|
||||
ln -s ${f}3 "$pkgdir"/usr/bin/$f
|
||||
done
|
||||
|
||||
install -Dm644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE.txt
|
||||
}
|
||||
|
||||
package_tauthon-cython() {
|
||||
pkgdesc="C-Extensions for Tauthon"
|
||||
depends=(tauthon-setuptools)
|
||||
replaces=(cython2)
|
||||
conflicts=(cython2)
|
||||
provides=(cython2)
|
||||
|
||||
cd cython-$pkgver-tauthon
|
||||
tauthon setup.py install --root="$pkgdir" --skip-build
|
||||
|
||||
for f in cygdb cython cythonize; do
|
||||
mv "$pkgdir"/usr/bin/$f "$pkgdir"/usr/bin/${f}-tauthon
|
||||
done
|
||||
|
||||
install -Dm644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE.txt
|
||||
}
|
||||
Reference in New Issue
Block a user