diff --git a/python-filetype/.SRCINFO b/python-filetype/.SRCINFO new file mode 100644 index 000000000..7674dde3c --- /dev/null +++ b/python-filetype/.SRCINFO @@ -0,0 +1,13 @@ +pkgbase = python-filetype + pkgdesc = Infer file type and MIME type of any file/buffer + pkgver = 1.2.0 + pkgrel = 3 + url = https://github.com/h2non/filetype.py + arch = any + license = MIT + makedepends = python-setuptools + depends = python + source = https://github.com/h2non/filetype.py/archive/v1.2.0/python-filetype-1.2.0.tar.gz + sha512sums = e6116dd5505c01803c29016a8e85ce3f126c998f882eb1cfa8ff67990f560fee486d06b27dc64dbd74490f5d0f0327a9af0074e9cf1e16d3d55e71eeb2575c75 + +pkgname = python-filetype diff --git a/python-filetype/.gitignore b/python-filetype/.gitignore new file mode 100644 index 000000000..335ec9573 --- /dev/null +++ b/python-filetype/.gitignore @@ -0,0 +1 @@ +*.tar.gz diff --git a/python-filetype/PKGBUILD b/python-filetype/PKGBUILD new file mode 100644 index 000000000..98671db34 --- /dev/null +++ b/python-filetype/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Fabio 'Lolix' Loli -> https://github.com/FabioLolix +# Contributor: Felix Yan +# Contributor: JP-Ellis + +pkgname=python-filetype +pkgver=1.2.0 +pkgrel=3 +pkgdesc="Infer file type and MIME type of any file/buffer" +url="https://github.com/h2non/filetype.py" +license=('MIT') +arch=('any') +depends=('python') +makedepends=('python-setuptools') +source=("https://github.com/h2non/filetype.py/archive/v$pkgver/$pkgname-$pkgver.tar.gz") +sha512sums=('e6116dd5505c01803c29016a8e85ce3f126c998f882eb1cfa8ff67990f560fee486d06b27dc64dbd74490f5d0f0327a9af0074e9cf1e16d3d55e71eeb2575c75') + +build() { + cd filetype.py-$pkgver + python setup.py build +} + +check() { + cd filetype.py-$pkgver + python -m unittest discover +} + +package() { + cd filetype.py-$pkgver + python setup.py install --root="$pkgdir" --optimize=1 + install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ +}