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

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

packager="Great-OS Team"
maintainer="Great-OS Team"

name="python-installer"
_name="installer"
version="0.7.0"
release=1

PKGMK_KEEP_SOURCES="no"
source=(https://github.com/pypa/installer/archive/refs/tags/$version.tar.gz)

prepare() {
  pip3 install installer pyproject_hooks --no-build-isolation --no-deps
}

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

package() {
  cd $_name-$version
  python3 -m installer --destdir="$PKG" dist/*.whl

  rm "$PKG"/usr/lib/python*/site-packages/installer/_scripts/*.exe
}
