description='A simple, correct PEP517 package builder'
url='https://github.com/pypa/build'

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

makedepends=(python-setuptools python-wheel python-flit-core python-packaging python-pyproject-hooks)

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

version=1.2.2
release=2

source=(https://files.pythonhosted.org/packages/source/${name:7:1}/${name#*-}/${name#*-}-$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 
}
