summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7126f7b933ed3b640849e7317f42fe4673f44ca6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=cython-git
pkgver=3.0.0b2.r40.gd0bbecb7f
pkgrel=1
pkgdesc="C-Extensions for Python"
arch=('i686' 'x86_64')
url="https://cython.org/"
license=('Apache')
depends=('python')
makedepends=('git' 'python-build' 'python-installer' 'python-wheel')
provides=("cython=$pkgver")
conflicts=('cython')
source=("git+https://github.com/cython/cython.git")
sha256sums=('SKIP')


pkgver() {
  cd "cython"

  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "cython"

  python \
    -m build \
    --wheel \
    --no-isolation
}

package() {
  cd "cython"

  python \
    -m installer \
    --destdir="$pkgdir" \
    dist/*.whl

  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
}