python-numpy: install f2py header too

While I'm here:
- some clean up
- remove old cruft

Close #964.
This commit is contained in:
Alessio Sergi 2015-02-11 19:59:59 +01:00
parent 6142cfe8db
commit d05849a144

View file

@ -1,7 +1,7 @@
# Template file for 'python-numpy'
pkgname=python-numpy
version=1.9.1
revision=2
revision=3
wrksrc="numpy-${version}"
build_style=python-module
python_versions="2.7 3.4"
@ -15,6 +15,7 @@ homepage="http://www.numpy.org/"
license="3-clause-BSD"
distfiles="${SOURCEFORGE_SITE}/numpy/NumPy/${version}/numpy-${version}.tar.gz"
checksum=0075bbe07e30b659ae4415446f45812dc1b96121a493a4a1f8b1ba77b75b1e1c
nocross=yes
export ATLAS=None
LDFLAGS="-shared"
@ -23,14 +24,6 @@ pre_build() {
# make sure _dotblas.so gets built
sed -i '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py
# no tests
sed -i "/config.add_data_dir('tests\/data')/d" numpy/core/setup.py
sed -i "/config.add_data_dir('tests')/d" numpy/setup.py numpy/*/setup.py
# remove *.c source files
sed -i "/config.add_data_files('mingw\/gfortran_vs2003_hack.c')/d" numpy/distutils/setup.py
sed -i "/config.add_data_files/,+3d" numpy/f2py/setup.py
# remove shebangs
find . -type f -name '*.py' -exec sed -i "s,^#!.*python$,," {} +
}
@ -41,14 +34,16 @@ post_install() {
# create compat symlinks for .h files
vmkdir usr/include/python2.7
ln -sf /usr/lib/python2.7/site-packages/numpy/core/include/numpy ${DESTDIR}/usr/include/python2.7
ln -sfr ${DESTDIR}/usr/lib/python2.7/site-packages/numpy/core/include/numpy \
${DESTDIR}/usr/include/python2.7
vmkdir usr/include/python3.4m
ln -sf /usr/lib/python3.4/site-packages/numpy/core/include/numpy ${DESTDIR}/usr/include/python3.4m
ln -sfr ${DESTDIR}/usr/lib/python3.4/site-packages/numpy/core/include/numpy \
${DESTDIR}/usr/include/python3.4m
# install f2py*.1 man pages and license
vman ${wrksrc}/doc/f2py/f2py.1
vman ${wrksrc}/doc/f2py/f2py.1 f2py3.1
vlicense ${wrksrc}/LICENSE.txt LICENSE
vman doc/f2py/f2py.1
vman doc/f2py/f2py.1 f2py3.1
vlicense LICENSE.txt LICENSE
}
python-numpy-devel_package() {
@ -58,6 +53,7 @@ python-numpy-devel_package() {
vmove usr/include/python2.7
vmove usr/lib/python2.7/site-packages/numpy/core/include/numpy
vmove usr/lib/python2.7/site-packages/numpy/random/randomkit.h
vmove usr/lib/python2.7/site-packages/numpy/f2py/src/fortranobject.h
}
}
python3.4-numpy_package() {
@ -78,5 +74,6 @@ python3.4-numpy-devel_package() {
vmove usr/include/python3.4m
vmove usr/lib/python3.4/site-packages/numpy/core/include/numpy
vmove usr/lib/python3.4/site-packages/numpy/random/randomkit.h
vmove usr/lib/python3.4/site-packages/numpy/f2py/src/fortranobject.h
}
}