diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 34 |
1 files changed, 13 insertions, 21 deletions
@@ -2,33 +2,25 @@ # shellcheck disable=2034,2148,2154 -_pkgname=atoml pkgname=python-atoml +_name=${pkgname#python-} pkgver=1.1.1 -pkgrel=2 +pkgrel=3 pkgdesc="Yet another style-preserving TOML library for Python." arch=("any") url="https://github.com/frostming/atoml.git" license=("MIT") -makedepends=("python-pip") -_pkgname_prefix="${_pkgname:0:1}" -_pkgname_underscored="${_pkgname//-/_}" -_pkgurl="https://files.pythonhosted.org/packages/py3/$_pkgname_prefix/$_pkgname/$_pkgname_underscored-$pkgver-py3-none-any.whl" -source=("$_pkgurl") -sha512sums=('639083df303af0c38ff9f8a384da3e2b1a3a82cd17fb1ca9b2eed68f97e4e222b020df441c52472cac98e46d069fc3e5db197ad8cc55f41a554b8f5af70a222b') +makedepends=(python-installer python-build python-wheel python-pdm-pep517) +source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name//-/_}-${pkgver}.tar.gz") +sha512sums=('2739ae8facfc0ae7512d287e8597967caf815ae48be692c5c1814bee288e51acc7570dcb119f732fa15f6d240590b64b73b85a1b0144048eedfab8d62c840291') + +build() { + cd "$srcdir/${_name}-$pkgver" || exit 1 + python -m build --wheel --no-isolation +} package() { - cd "$srcdir" || exit - PIP_CONFIG_FILE=/dev/null pip install \ - --root="$pkgdir" \ - --isolated \ - --ignore-installed \ - --no-deps \ - --no-compile \ - --no-warn-script-location \ - ${_pkgname//-/_}-$pkgver-py3-none-any.whl - python -O -m compileall -s "$pkgdir" "$pkgdir/usr/lib/" - mapfile -t direct_url_file < <(find "$pkgdir"/usr/lib -type f -name 'direct_url.json') - rm -rvf "${direct_url_file[@]}" || true - install -Dm644 "${_pkgname//-/_}-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + cd "$srcdir/${_name}-$pkgver" || exit 1 + python -m installer --destdir="$pkgdir" dist/*.whl + install -Dm644 "$srcdir/${_name//-/_}-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |