summaryrefslogtreecommitdiff
path: root/python-tifffile/PKGBUILD
blob: 66cf245ecb8c9a88a3b558a565103933efc43909 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Astro Benzene <universebenzene at sina dot com>
# Contributor: Francois Boulogne <fboulogne at april dot org>

pkgname=python-tifffile
pkgver=2020.8.25
_pyname=${pkgname#python-}
pkgrel=1
pkgdesc="Read and write image data from and to TIFF files"
arch=('any')
url="https://github.com/cgohlke/tifffile"
license=('BSD')
makedepends=('python-setuptools')
depends=('python-numpy>=1.15.1')
optdepends=('python-matplotlib>=3.1: required only for plotting'
            'python-imagecodecs>=2020.2.18: required only for encoding or decoding LZW, JPEG, etc'
            'python-lxml: required only for validating and printing XML')
#checkdepends=('python-pytest')
source=("https://github.com/cgohlke/$_pyname/archive/v$pkgver.tar.gz")
sha512sums=('aacdff8efd9180b42aaec07c82b823255ae4887f75370f07365c64bc3f8bc382e5ea83559c59fadcfcef3b0f167e914f4e8f52ec30c45f627360e36f0994f826')

build() {
    cd ${srcdir}/${_pyname}-${pkgver}

    python setup.py build
}

#check() {
#    cd ${srcdir}/${_pyname}-${pkgver}
#
#    PYTHONPATH="build/lib" pytest
#}

package() {
    cd ${srcdir}/${_pyname}-${pkgver}

    install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
    install -Dm644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
    python setup.py install --root="${pkgdir}" --optimize=1
}