description="A library to manipulate font files from Python"
url="https://github.com/fonttools/fonttools"

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

makedepends=(python-setuptools python-wheel cython)

name=python-fonttools
_name="fonttools"
alias=(${_name})

version=4.53.1

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

build() {

cd ${_name}-$version

  pip3 wheel -w dist \
    --no-build-isolation \
    --no-deps $PWD
  pip3 install --no-index \
    --find-links dist \
    --no-cache-dir    \
    --no-user         \
    --root=$PKG       \
    ${_name}

 find $PKG -type d -name vendor -o -name tests |xargs rm -rf

install -Dm644 LICENSE $PKG/usr/share/licenses/$name/LICENSE
install -Dm644 LICENSE.external $PKG/usr/share/licenses/$name/LICENSE.external
}
