2014-05-29 17:02:56 +00:00
|
|
|
# Template file for 'python-numpy'
|
|
|
|
pkgname=python-numpy
|
2014-11-04 16:04:00 +00:00
|
|
|
version=1.9.1
|
2015-02-11 18:59:59 +00:00
|
|
|
revision=3
|
2014-08-30 22:31:35 +00:00
|
|
|
wrksrc="numpy-${version}"
|
2014-05-29 17:02:56 +00:00
|
|
|
build_style=python-module
|
2014-08-30 22:31:35 +00:00
|
|
|
python_versions="2.7 3.4"
|
|
|
|
hostmakedepends="python-setuptools python3.4-setuptools gcc-fortran"
|
|
|
|
makedepends="python-devel python3.4-devel blas-devel lapack-devel"
|
2014-05-29 17:02:56 +00:00
|
|
|
pycompile_module="numpy"
|
2014-08-30 22:31:35 +00:00
|
|
|
short_desc="Fast and sophisticated array facility to Python2"
|
2015-01-27 16:55:01 +00:00
|
|
|
_short_desc="${short_desc/Python2/Python3.4}"
|
2014-11-04 16:04:00 +00:00
|
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
2014-08-30 22:31:35 +00:00
|
|
|
homepage="http://www.numpy.org/"
|
|
|
|
license="3-clause-BSD"
|
2014-05-29 17:02:56 +00:00
|
|
|
distfiles="${SOURCEFORGE_SITE}/numpy/NumPy/${version}/numpy-${version}.tar.gz"
|
2014-11-04 16:04:00 +00:00
|
|
|
checksum=0075bbe07e30b659ae4415446f45812dc1b96121a493a4a1f8b1ba77b75b1e1c
|
2015-02-11 18:59:59 +00:00
|
|
|
nocross=yes
|
2014-08-30 22:31:35 +00:00
|
|
|
|
|
|
|
export ATLAS=None
|
|
|
|
LDFLAGS="-shared"
|
|
|
|
|
|
|
|
pre_build() {
|
|
|
|
# make sure _dotblas.so gets built
|
|
|
|
sed -i '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py
|
|
|
|
|
2015-01-27 16:55:01 +00:00
|
|
|
# remove shebangs
|
|
|
|
find . -type f -name '*.py' -exec sed -i "s,^#!.*python$,," {} +
|
|
|
|
}
|
2014-08-30 22:31:35 +00:00
|
|
|
post_install() {
|
|
|
|
# create symlinks for unversioned f2py* scripts
|
|
|
|
ln -sf f2py2.7 ${DESTDIR}/usr/bin/f2py
|
|
|
|
ln -sf f2py3.4 ${DESTDIR}/usr/bin/f2py3
|
|
|
|
|
2015-01-27 16:55:01 +00:00
|
|
|
# create compat symlinks for .h files
|
2014-08-30 22:31:35 +00:00
|
|
|
vmkdir usr/include/python2.7
|
2015-02-11 18:59:59 +00:00
|
|
|
ln -sfr ${DESTDIR}/usr/lib/python2.7/site-packages/numpy/core/include/numpy \
|
|
|
|
${DESTDIR}/usr/include/python2.7
|
2015-01-27 16:55:01 +00:00
|
|
|
vmkdir usr/include/python3.4m
|
2015-02-11 18:59:59 +00:00
|
|
|
ln -sfr ${DESTDIR}/usr/lib/python3.4/site-packages/numpy/core/include/numpy \
|
|
|
|
${DESTDIR}/usr/include/python3.4m
|
2014-08-30 22:31:35 +00:00
|
|
|
|
2015-01-27 16:55:01 +00:00
|
|
|
# install f2py*.1 man pages and license
|
2015-02-11 18:59:59 +00:00
|
|
|
vman doc/f2py/f2py.1
|
|
|
|
vman doc/f2py/f2py.1 f2py3.1
|
|
|
|
vlicense LICENSE.txt LICENSE
|
2014-08-30 22:31:35 +00:00
|
|
|
}
|
|
|
|
|
2015-01-27 16:55:01 +00:00
|
|
|
python-numpy-devel_package() {
|
|
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
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
|
2015-02-11 18:59:59 +00:00
|
|
|
vmove usr/lib/python2.7/site-packages/numpy/f2py/src/fortranobject.h
|
2015-01-27 16:55:01 +00:00
|
|
|
}
|
|
|
|
}
|
2014-08-30 22:31:35 +00:00
|
|
|
python3.4-numpy_package() {
|
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="numpy"
|
2015-01-27 16:55:01 +00:00
|
|
|
short_desc="${_short_desc}"
|
2014-08-30 22:31:35 +00:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/bin/f2py3*
|
|
|
|
vmove usr/lib/python3.4
|
|
|
|
vmove usr/share/man/man1/f2py3.1
|
|
|
|
vlicense ${wrksrc}/LICENSE.txt LICENSE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
python3.4-numpy-devel_package() {
|
|
|
|
depends="python3.4-numpy>=${version}_${revision}"
|
2015-01-27 16:55:01 +00:00
|
|
|
short_desc="${_short_desc} - development files"
|
2014-08-30 22:31:35 +00:00
|
|
|
pkg_install() {
|
2015-01-27 16:55:01 +00:00
|
|
|
vmove usr/include/python3.4m
|
2014-08-30 22:31:35 +00:00
|
|
|
vmove usr/lib/python3.4/site-packages/numpy/core/include/numpy
|
|
|
|
vmove usr/lib/python3.4/site-packages/numpy/random/randomkit.h
|
2015-02-11 18:59:59 +00:00
|
|
|
vmove usr/lib/python3.4/site-packages/numpy/f2py/src/fortranobject.h
|
2014-08-30 22:31:35 +00:00
|
|
|
}
|
|
|
|
}
|