description='Low-level library for installing a Python package from a wheel distribution'
url='https://github.com/pypa/installer'

license="MIT"

packager="spiky <spiky@nutyx.org>"
contributors="Tnut"

_name="installer"

alias=(${_name})

name=python-installer
version=0.7.0
release=2

makedepends=(python python-flit-core python-build)

source=($url/archive/refs/tags/$version.tar.gz)

PKGMK_KEEP_SOURCES="no"

build() {
  cd ${_name}-$version
  python -m build -wn --skip-dependency-check

  PYTHONPATH=src python -m installer --destdir=$PKG dist/*.whl

  find $PKG -type d -name vendor -o -name "*.exe" |xargs rm -rf
  install -Dm 644 LICENSE $PKG/usr/share/licenses/$name/LICENSE
}
