2014-05-29 19:02:56 +02:00
|
|
|
# Template file for 'python-numpy'
|
|
|
|
pkgname=python-numpy
|
2014-09-12 13:31:00 +02:00
|
|
|
version=1.9.0
|
2014-05-29 19:02:56 +02:00
|
|
|
revision=1
|
2014-08-31 00:31:35 +02:00
|
|
|
wrksrc="numpy-${version}"
|
2014-05-29 19:02:56 +02:00
|
|
|
build_style=python-module
|
2014-08-31 00:31:35 +02: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 19:02:56 +02:00
|
|
|
pycompile_module="numpy"
|
2014-08-31 00:31:35 +02:00
|
|
|
short_desc="Fast and sophisticated array facility to Python2"
|
2014-05-29 19:02:56 +02:00
|
|
|
maintainer="Carlo Dormeletti <carlo.dormeletti@email.it>"
|
2014-08-31 00:31:35 +02:00
|
|
|
homepage="http://www.numpy.org/"
|
|
|
|
license="3-clause-BSD"
|
2014-05-29 19:02:56 +02:00
|
|
|
distfiles="${SOURCEFORGE_SITE}/numpy/NumPy/${version}/numpy-${version}.tar.gz"
|
2014-09-12 13:31:00 +02:00
|
|
|
checksum=f7e6cede959ec7d26dc242150839f3193b4ec16d733f1a4bff623c4ed0d27ff5
|
2014-08-31 00:31:35 +02:00
|
|
|
|
|
|
|
export ATLAS=None
|
|
|
|
LDFLAGS="-shared"
|
|
|
|
|
|
|
|
pre_build() {
|
|
|
|
# make sure _dotblas.so gets built
|
|
|
|
sed -i '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py
|
|
|
|
|
2014-09-12 13:31:00 +02:00
|
|
|
# no tests
|
2014-08-31 00:31:35 +02:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
# create symlinks for unversioned f2py* scripts
|
|
|
|
ln -sf f2py2.7 ${DESTDIR}/usr/bin/f2py
|
|
|
|
ln -sf f2py3.4 ${DESTDIR}/usr/bin/f2py3
|
|
|
|
|
|
|
|
# fix shebangs for python3.4
|
|
|
|
cd ${DESTDIR}/usr/lib/python3.4/site-packages/numpy
|
|
|
|
find . -name '*.py' -exec sed -i -e 's,#!.*python$,&3.4,' {} +
|
|
|
|
|
|
|
|
# create 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/numpy
|
|
|
|
vmkdir usr/include/python3.4
|
|
|
|
ln -sf /usr/lib/python3.4/site-packages/numpy/core/include/numpy ${DESTDIR}/usr/include/python3.4/numpy
|
|
|
|
|
|
|
|
# install f2py*.1 man pages
|
2014-09-12 13:31:00 +02:00
|
|
|
vman ${wrksrc}/doc/f2py/f2py.1
|
|
|
|
vman ${wrksrc}/doc/f2py/f2py.1 f2py3.1
|
2014-08-31 00:31:35 +02:00
|
|
|
|
|
|
|
vlicense ${wrksrc}/LICENSE.txt LICENSE
|
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-numpy_package() {
|
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="numpy"
|
|
|
|
short_desc="${short_desc/Python2/Python3.4}"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/bin/f2py3*
|
|
|
|
vmove usr/lib/python3.4
|
|
|
|
vmove usr/share/man/man1/f2py3.1
|
|
|
|
vlicense ${wrksrc}/LICENSE.txt LICENSE
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python-numpy-devel_package() {
|
|
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include/python2.7/numpy
|
|
|
|
vmove usr/lib/python2.7/site-packages/numpy/core/include/numpy
|
|
|
|
vmove usr/lib/python2.7/site-packages/numpy/random/randomkit.h
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-numpy-devel_package() {
|
|
|
|
depends="python3.4-numpy>=${version}_${revision}"
|
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include/python3.4/numpy
|
|
|
|
vmove usr/lib/python3.4/site-packages/numpy/core/include/numpy
|
|
|
|
vmove usr/lib/python3.4/site-packages/numpy/random/randomkit.h
|
|
|
|
}
|
|
|
|
}
|