diff options
author | 0x9fff00 | 2021-05-09 15:38:14 +0200 |
---|---|---|
committer | 0x9fff00 | 2021-05-09 15:38:14 +0200 |
commit | c6792972bb2031a6974fbaeefd3d95d82f94c74b (patch) | |
tree | 1868c9dcc3d72145566e24871236fd06baec1fb0 /PKGBUILD | |
parent | ca9d1d8d4d17255c6c7d00ecfdab95c41b1c6ff1 (diff) | |
download | aur-c6792972bb2031a6974fbaeefd3d95d82f94c74b.tar.gz |
build and install from wheel to fix json not being installed
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -3,35 +3,36 @@ _name=PyMCTranslate _pkgname=python-${_name,,} pkgname=$_pkgname-git -pkgver=r409.edd274e3 +pkgver=1.0.2.r0.gf2bc730e pkgrel=1 pkgdesc='A library of block mappings that can be used to convert from any Minecraft format into any other Minecraft format' arch=('any') url="https://github.com/gentlegiantJGC/$_name" license=('custom') -depends=('python' 'python-numpy') -makedepends=('git' 'python-setuptools') +depends=('python' 'python-amulet-nbt' 'python-numpy') +makedepends=('git' 'python-pip' 'python-setuptools' 'python-wheel') provides=("$_pkgname") conflicts=("$_pkgname") -options=(!strip) # strip is extremely slow and there are no ELF files anyway source=("git+$url.git") sha256sums=('SKIP') pkgver() { cd "$_name" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } build() { cd "$_name" - python setup.py build + # only bdist_wheel minifies and installs json + python setup.py bdist_wheel } package() { cd "$_name" - python setup.py install --root="$pkgdir" --optimize=1 --skip-build + PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps "dist/$_name-$(python -c 'import versioneer; print(versioneer.get_version())')-py3-none-any.whl" + python -O -m compileall "$pkgdir"/usr/lib/python*/site-packages/$_name install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |