void-packages/srcpkgs/python-numpy/template
Alessio Sergi 3e0c263ac2 python-numpy: remove -devel subpkg to avoid circular dep
python-numpy-devel contains some headers that are needed by f2py.
f2py that comes with python-numpy needs those headers. So, we would
need to have python-numpy-devel as a dependency of python-numpy.
The usual foo/foo-devel distinction makes no sense for this package.
2015-11-20 08:10:50 +01:00

60 lines
1.7 KiB
Bash

# Template file for 'python-numpy'
pkgname=python-numpy
version=1.10.1
revision=2
replaces="python-numpy-devel>=0"
wrksrc="numpy-${version}"
build_style=python-module
python_versions="2.7 3.4"
hostmakedepends="python-setuptools python3.4-setuptools gcc-fortran"
makedepends="python-devel python3.4-devel blas-devel lapack-devel"
pycompile_module="numpy"
short_desc="Fast and sophisticated array facility to Python2"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="http://www.numpy.org/"
license="3-clause-BSD"
distfiles="${PYPI_SITE}/n/numpy/numpy-${version}.tar.gz"
checksum=8b9f453f29ce96a14e625100d3dcf8926301d36c5f622623bf8820e748510858
nocross=yes
export ATLAS=None
LDFLAGS="-shared"
pre_build() {
# make sure _dotblas.so gets built
sed -i '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py
# remove shebangs
find numpy -type f -name '*.py' -exec sed -i '/^#!.*python$/d' {} +
}
post_install() {
# create symlink for unversioned f2py* script
ln -sf f2py2.7 ${DESTDIR}/usr/bin/f2py
# create compat symlinks for .h files
vmkdir 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 -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 doc/f2py/f2py.1
vman doc/f2py/f2py.1 f2py3.4.1
vlicense LICENSE.txt LICENSE
}
python3.4-numpy_package() {
replaces="python3.4-numpy-devel>=0"
pycompile_version="3.4"
pycompile_module="numpy"
short_desc="${short_desc/Python2/Python3.4}"
pkg_install() {
vmove usr/bin/f2py3.4
vmove usr/lib/python3.4
vmove usr/include/python3.4m
vmove usr/share/man/man1/f2py3.4.1
vlicense LICENSE.txt LICENSE
}
}