summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e65b70169b96ff6ea41c1d1b0222e09cc32f3531 (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
# Maintainer: Astro Benzene <universebenzene at sina dot com>
pkgbase=python-stsci.imagestats
_pyname=${pkgbase#python-}
pkgname=("python-${_pyname}")
pkgver=1.6.2
pkgrel=2
pkgdesc="STScI clipped image statistics with core functionality of IRAF's imstatistics"
arch=('i686' 'x86_64')
url="https://stsciimagestats.readthedocs.io/"
license=('BSD')
makedepends=('python-setuptools' 'python-numpy' 'python-relic')
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz"
        'https://raw.githubusercontent.com/spacetelescope/stsci.imagestats/master/LICENSE.txt')
md5sums=('54fde240cb959755efee0b9f0c8e9450'
         'ca8dea23b938590a38eb415a5e448511')
_pyver=$(python -V | cut -c 8-10)

package_python-stsci.imagestats() {
    depends=('python>=3.5' 'python-numpy>=1.13' 'python-stsci.tools')
    optdepends=('python-stsci.imagestats-doc: Documentation for STScI Imagestats')
    cd ${srcdir}/${_pyname}-${pkgver}

    install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "${srcdir}/LICENSE.txt"
    install -D -m644 -t "${pkgdir}/usr/share/doc/${pkgname}" README.rst
    python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
    rm "${pkgdir}/usr/lib/python${_pyver}/site-packages/stsci/__init__.py"
    rm "${pkgdir}/usr/lib/python${_pyver}/site-packages/stsci/__pycache__"/*
}