# Description: Fancy PyPI READMEs with Hatch
# URL: https://github.com/hynek/hatch-fancy-pypi-readme
# Maintainer: Matt Housh, jaeger at crux dot ninja
# Depends on: python3-build python3-hatchling

name=python3-hatch-fancy-pypi-readme
version=23.1.0
release=1
source=(https://github.com/hynek/hatch-fancy-pypi-readme/archive/$version/$name-$version.tar.gz)

build() {
    cd hatch-fancy-pypi-readme-$version
    /usr/bin/python3 -m build --wheel --no-isolation
    PIP_CONFIG_FILE=/dev/null /usr/bin/pip3 install --isolated --root=$PKG \
        --ignore-installed --no-deps dist/*.whl

    rm $PKG/usr/lib/python*/site-packages/hatch_fancy_pypi_readme-*/{licenses/AUTHORS.md,INSTALLER}
}
