upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-js2py / trunk / PKGBUILD
blob2f2007dbb1239384dfba4aa036271ceb50eb2ac8
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-js2py
4 pkgver=0.72
5 _commit=70fe4f557e957db082ee49f8e9b4cf4ac80071ef
6 pkgrel=3
7 pkgdesc="JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python"
8 url="https://github.com/PiotrDabkowski/Js2Py"
9 license=('MIT')
10 arch=('any')
11 depends=('python-six' 'python-pyjsparser')
12 makedepends=('python-setuptools' 'python-tzlocal')
13 checkdepends=('npm' 'python-numpy')
14 optdepends=('python-tzlocal: for local timezone support')
15 source=("$pkgname-$_commit.tar.gz::https://github.com/PiotrDabkowski/Js2Py/archive/$_commit.tar.gz"
16         "js2py-opt-tzlocal.patch::https://github.com/PiotrDabkowski/Js2Py/pull/293.patch")
17 sha512sums=('55ae8ff0d9875ce7588bbd5541077015070b95c382e2ce35a40b44939e5194cd3f29b08d544ad38d37d5cd38e6fc01884fabb35bbb2449566051095d224c4592'
18             'db4fce5b0b26cc89346347719f7feb8da65119ef54504f6475d7a52f0dbb6483c26ff259a1b5c54c98422057e64debad5d2d92585e1acfd1a1c67f301d6a328c')
20 prepare() {
21   mv Js2Py-{$_commit,$pkgver}
22   cd Js2Py-$pkgver
23   # https://github.com/PiotrDabkowski/Js2Py/pull/293
24   patch --forward --strip=1 --input=../js2py-opt-tzlocal.patch
27 build() {
28   cd Js2Py-$pkgver
29   python setup.py build
32 check() {
33   cd Js2Py-$pkgver
34   python simple_test.py
37 package() {
38   cd Js2Py-$pkgver
39   python setup.py install --root="$pkgdir" --optimize=1
40   install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/