summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aff92faec91923ba78e5fcbe810aca9a27b5cd32 (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
pkgname="rustpython-git"
pkgver=r11862.2a26ed009
pkgrel=1
pkgdesc='A Python3 Interpreter written in Rust'
arch=('x86_64' 'i686')
url='https://github.com/RustPython/RustPython'
#depends=('')
makedepends=('rust' 'python')
license=('MIT')
source=('git+https://github.com/RustPython/RustPython.git')
md5sums=('SKIP')

pkgver() {
  cd RustPython
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$srcdir/RustPython"
    cargo build --release --locked
}

check() {
    cd "$srcdir/RustPython"
    cargo test --release --locked
}

package() {
    cd "$srcdir/RustPython"
    install -Dm755 target/release/rustpython -t "$pkgdir/usr/bin"
    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}