diff options
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | patch.numpy | 15 |
3 files changed, 37 insertions, 13 deletions
@@ -1,19 +1,20 @@ -# Generated by mksrcinfo v8 -# Thu Dec 22 14:09:58 UTC 2016 pkgbase = python2-bufr pkgdesc = Generic Python BUFR file reader based on ECMWF BUFR library - pkgver = 0.2.5 - pkgrel = 3 + pkgver = 9bce29b + pkgrel = 1 url = https://github.com/pytroll/python-bufr arch = i686 arch = x86_64 license = GPL3 + makedepends = git makedepends = python2-numpy makedepends = eccodes depends = python2 options = !emptydirs - source = https://github.com/pytroll/python-bufr/archive/v0.2-5.tar.gz - md5sums = 78cb04b43e61d7c097a0b8f8c805ab3f + source = git://github.com/pytroll/python-bufr.git + source = patch.numpy + md5sums = SKIP + md5sums = 0f451c84f573da6e902bba627db1c6fc pkgname = python2-bufr @@ -1,21 +1,29 @@ # Maintainer: Rich Lindsley <richli.ff at gmail dot com> pkgname=python2-bufr _py_pkgname=python-bufr # The pypi package name -pkgver="0.2.5" +pkgver=9bce29b _py_pkgver="0.2-5" # the official version has a hyphen -pkgrel=3 +pkgrel=1 pkgdesc="Generic Python BUFR file reader based on ECMWF BUFR library" arch=('i686' 'x86_64') url="https://github.com/pytroll/python-bufr" license=('GPL3') depends=('python2') -makedepends=('python2-numpy' 'eccodes') +makedepends=('git' 'python2-numpy' 'eccodes') options=(!emptydirs) -source=(https://github.com/pytroll/python-bufr/archive/v0.2-5.tar.gz) -md5sums=('78cb04b43e61d7c097a0b8f8c805ab3f') +source=(git://github.com/pytroll/python-bufr.git patch.numpy) +md5sums=('SKIP' + '0f451c84f573da6e902bba627db1c6fc') + +pkgver() { + cd $srcdir/$_gitname + # Use the tag of the last commit + git describe --always | sed 's|-|.|g' +} build() { - cd "$srcdir/$_py_pkgname-$_py_pkgver/bufr" + cd "$srcdir/$_py_pkgname/bufr" + patch -p2 -i $srcdir/patch.numpy # We enforce this to be a strictly python2 package sed -i -e "s|^#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ @@ -27,7 +35,7 @@ build() { } package() { - cd "$srcdir/$_py_pkgname-$_py_pkgver/bufr" + cd "$srcdir/$_py_pkgname/bufr" python2 setup.py install --root="$pkgdir/" --optimize=1 } diff --git a/patch.numpy b/patch.numpy new file mode 100644 index 000000000000..4e34dc28d6d4 --- /dev/null +++ b/patch.numpy @@ -0,0 +1,15 @@ +--- python-bufr/bufr/setup.py.org 2019-06-26 11:37:48.737889897 +0200 ++++ python-bufr/bufr/setup.py 2019-06-26 11:37:17.287328210 +0200 +@@ -22,10 +22,12 @@ + + import os + import sys ++import numpy + from setuptools import setup, Extension + + BUFRFile = Extension('bufr/_BUFRFile', + sources = ['bufr/_BUFRFile.c',], ++ include_dirs=[numpy.get_include()], + extra_compile_args = ['-O3','-g','-fstack-protector-all', + '-D_FORTIFY_SOURCE=2'], + extra_link_args = [], |