diff options
author | Adrian Perez de Castro | 2024-04-26 11:33:48 +0300 |
---|---|---|
committer | Adrian Perez de Castro | 2024-04-26 11:33:48 +0300 |
commit | c5b0d3abd47b958c50f4760aa0f19ab5aa906f65 (patch) | |
tree | ac8e413dd9253d8bce77ef8ed5718a565a606ce5 /PKGBUILD | |
parent | 4c3c5a0d5baf5148f6da9c02197759aa76166bcf (diff) | |
download | aur-python-zopfli-git.tar.gz |
Fix Git error about file protocol, modernize packaging
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -1,18 +1,18 @@ pkgname='python-zopfli-git' pkgdesc='Python bindings for the Zopfli compressor' -pkgver=0.0.7.r2.gfdaf482 +pkgver=0.0.8.r0.gfdaf482 pkgrel=1 arch=('x86_64') -license=('Apache') -depends=('python') -makedepends=('git') -url='https://github.com/anthrotype/py-zopfli' -source=("${pkgname}::git+${url}" - "zopfli::git+https://github.com/google/zopfli") -sha512sums=('SKIP' 'SKIP') +license=(Apache-2.0) +depends=(glibc python) +makedepends=(git python-build python-installer python-setuptools python-wheel) +url=https://github.com/anthrotype/py-zopfli +source=("$pkgname::git+$url" + 'git+https://github.com/google/zopfli.git') +sha512sums=(SKIP SKIP) pkgver () { - cd "${pkgname}" + cd "$pkgname" ( set -o pipefail git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || @@ -21,18 +21,18 @@ pkgver () { } prepare () { - cd "${pkgname}" + cd "$pkgname" git submodule init - git config submodule.zopfli.url "${srcdir}/zopfli" - git submodule update + git config submodule.zopfli.url "$srcdir/zopfli" + git -c protocol.file.allow=always submodule update } build () { - cd "${pkgname}" - python3 setup.py build + cd "$pkgname" + python -m build --wheel --no-isolation } package () { - cd "${pkgname}" - python setup.py install --root="${pkgdir}" --optimize=1 + cd "$pkgname" + python -m installer --destdir="$pkgdir" dist/*.whl } |