summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e123af9e462fa9f1ebbc2bc4b2b8482c4e6f2402 (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
# Maintainer: gmes78 <gmes.078 at gmail dot com>

# NOTE: building this package requires a nightly build of the Rust compiler.

pkgname=python-orjson-git
pkgver=2.2.0.r0.g95a03b0
pkgrel=1
pkgdesc="Fast, correct Python JSON library supporting dataclasses and datetimes (Git version)"
arch=(x86_64 i686)
url="https://github.com/ijl/orjson"
license=('Apache' 'MIT')

provides=('python-orjson')
conflicts=('python-orjson')

depends=('python')
makedepends=('git' 'python-pip' 'rust')

source=("git+https://github.com/ijl/orjson.git")
sha512sums=('SKIP')

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

build() {
	cd orjson
    rm -f "./*.whl" # remove old wheels

	PIP_CONFIG_FILE=/dev/null pip wheel --isolated --no-binary=orjson .
}

package() {
	cd orjson
	PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps ./*.whl
    install -Dm644 LICENSE-MIT "$pkgdir/usr/share/licenses/$pkgname/LICENSE-MIT"
}