archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-omegaconf / trunk / PKGBUILD
blob121a60151a70c192ffd67b9d9ca0eec855855c20
1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 # Contributor: Luis Martinez <luis dot martinez at disroot dot org>
3 # Contributor: Harley Wiltzer <harleyw@hotmail.com>
5 pkgname=python-omegaconf
6 _pkg="${pkgname#python-}"
7 pkgver=2.3.0
8 pkgrel=2
9 pkgdesc='Flexible Python configuration system'
10 arch=('any')
11 url='https://github.com/omry/omegaconf'
12 license=('BSD')
13 depends=('python-antlr4' 'python-pyaml')
14 makedepends=('antlr4' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
15 # checkdepends=('python-pytest' 'python-pytest-mock' 'python-pytest-lazy-fixture')
16 source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/o/$_pkg/$_pkg-$pkgver.tar.gz"
17         'antlr4-jar.patch')
18 sha256sums=('d5d4b6d29955cc50ad50c46dc269bcd92c6e00f5f90d23ab5fee7bfca4ba4cc7'
19             '9e27af3dfc66fbd239f16c000acb73adf872376d1c1b041ff31d1fc5b57389bb')
21 prepare() {
22         patch -p1 -d "$_pkg-$pkgver" < antlr4-jar.patch
25 build() {
26         cd "$_pkg-$pkgver"
27         python -m build --wheel --no-isolation
30 # check() {
31 #       cd "$_pkg-$pkgver"
32 #       PYTHONPATH="$PWD" pytest -x
33 # }
35 package() {
36         cd "$_pkg-$pkgver"
37         PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl
39         install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
41         install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"