blob: eb9f15701cd02b028437a617f0f455dca4af8d49 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Maintainer: richli <rich at dranek dot com>
# Contributor: Spyros Stathopoulos <foucault.online@gmail.com>
# Contributor: rememberthemer <rememberthemer@_GMAIL_DOT_COM_>
pkgname=python2-netcdf4
pkgver=1.2.0
pkgrel=1
pkgdesc="Python/numpy interface to the netCDF version 4 library."
arch=('x86_64' 'i686')
url="https://unidata.github.io/netcdf4-python/"
license=('MIT')
depends=('python2-numpy' 'netcdf' 'hdf5' 'curl' 'zlib')
makedepends=('python2-setuptools' 'cython2')
optdepends=('python-netcdf4: python 3 version')
source=(https://github.com/Unidata/netcdf4-python/archive/v${pkgver}rel.tar.gz)
md5sums=('c8fa3df0ede4f6d1506fb9663705cbe4')
build() {
cd "$srcdir"/netcdf4-python-${pkgver}rel
# USE_NCCONFIG=1 python2 setup.py clean --all
USE_NCCONFIG=1 python2 setup.py build
}
check() {
cd "$srcdir"/netcdf4-python-${pkgver}rel
cd "test"
PYTHONPATH="../build/lib.linux-${CARCH}-2.7" python2 -B ./run_all.py
}
package() {
cd "$srcdir"/netcdf4-python-${pkgver}rel
# Note that this installs the python2 package as well as some scripts in /usr/bin
USE_NCCONFIG=1 python2 setup.py install --prefix=/usr \
--root="$pkgdir" --skip-build --optimize 2
# We don't need to install the test suite if we already use it in check()
# install -m755 -d "$pkgdir"/usr/share/doc/$pkgname/test
# install -m644 -t "$pkgdir"/usr/share/doc/$pkgname/test test/*
# Install documentation
install -m755 -d "$pkgdir/usr/share/doc/$pkgname/docs"
install -m644 -t "$pkgdir/usr/share/doc/$pkgname/docs" docs/netCDF4/*
# The examples include over 100 MB of binary data, so we don't install it by default
# install -m755 -d "$pkgdir/usr/share/doc/$pkgname/examples"
# install -m755 -d "$pkgdir/usr/share/doc/$pkgname/examples/data"
# find examples -maxdepth 1 -type f -execdir install -m644 -t "$pkgdir/usr/share/doc/$pkgname/examples" {} \+
# find examples/data -maxdepth 1 -type f -execdir install -m644 -t "$pkgdir/usr/share/doc/$pkgname/examples/data" {} \+
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim: set et sw=4 ts=4 sts=4:
|