# Maintainer: Andreas Grapentin _pkgname=filetype pkgname=(python{,2}-$_pkgname) pkgver=1.0.4 pkgrel=1 pkgdesc="Small and dependency free Python package to infer file type and MIME type checking the magic numbers signature of a file or buffer." arch=(any) url="https://pypi.org/project/filetype/" license=('GPL') _depends=() makedepends=(python{,2}-setuptools) source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz") sha256sums=('366c50d0211798e696626f125134163ac2fff25a70131eec80a1d1a6196c1027') _package() { depends=("$1" "${_depends[@]/#/$1-}") cd "$srcdir"/$_pkgname-$pkgver $1 setup.py install --root="$pkgdir" } for _pkg in "${pkgname[@]}"; do eval "package_$_pkg () { _package ${_pkg%%-*}; }" done