summaryrefslogtreecommitdiff
path: root/pcr/python-filetype/PKGBUILD
blob: 43fe96c4945f7e6d672c09cfc297a4c8960d4e9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Maintainer: Andreas Grapentin <oaken-source@parabola.nu>
_pkgname=filetype
pkgname=(python{,2}-$_pkgname)
pkgver=1.0.5
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=('17a3b885f19034da29640b083d767e0f13c2dcb5dcc267945c8b6e5a5a9013c7')

_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