mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 15:43:49 +02:00
python-numpy: use alternatives for f2py utility
This commit is contained in:
parent
ef9ff35c38
commit
4606406a3a
1 changed files with 11 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'python-numpy'
|
# Template file for 'python-numpy'
|
||||||
pkgname=python-numpy
|
pkgname=python-numpy
|
||||||
version=1.10.4
|
version=1.10.4
|
||||||
revision=3
|
revision=4
|
||||||
wrksrc="numpy-${version}"
|
wrksrc="numpy-${version}"
|
||||||
build_style=python-module
|
build_style=python-module
|
||||||
python_versions="2.7 3.4"
|
python_versions="2.7 3.4"
|
||||||
|
@ -15,6 +15,10 @@ license="3-clause-BSD"
|
||||||
distfiles="${PYPI_SITE}/n/numpy/numpy-${version}.tar.gz"
|
distfiles="${PYPI_SITE}/n/numpy/numpy-${version}.tar.gz"
|
||||||
checksum=7356e98fbcc529e8d540666f5a919912752e569150e9a4f8d869c686f14c720b
|
checksum=7356e98fbcc529e8d540666f5a919912752e569150e9a4f8d869c686f14c720b
|
||||||
|
|
||||||
|
alternatives="
|
||||||
|
numpy:f2py:/usr/bin/f2py2.7
|
||||||
|
numpy:f2py.1:/usr/share/man/man1/f2py2.7.1"
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
i686|x86_64) makedepends+=" cblas-devel";;
|
i686|x86_64) makedepends+=" cblas-devel";;
|
||||||
esac
|
esac
|
||||||
|
@ -22,14 +26,7 @@ esac
|
||||||
export ATLAS=None
|
export ATLAS=None
|
||||||
LDFLAGS="-shared"
|
LDFLAGS="-shared"
|
||||||
|
|
||||||
pre_build() {
|
|
||||||
# remove shebangs
|
|
||||||
find numpy -type f -name '*.py' -exec sed -i '/^#!.*python$/d' {} +
|
|
||||||
}
|
|
||||||
post_install() {
|
post_install() {
|
||||||
# create symlink for unversioned f2py* script
|
|
||||||
ln -sf f2py2.7 ${DESTDIR}/usr/bin/f2py
|
|
||||||
|
|
||||||
# create compat symlinks for .h files
|
# create compat symlinks for .h files
|
||||||
vmkdir usr/include/python2.7
|
vmkdir usr/include/python2.7
|
||||||
ln -sfr ${DESTDIR}/usr/lib/python2.7/site-packages/numpy/core/include/numpy \
|
ln -sfr ${DESTDIR}/usr/lib/python2.7/site-packages/numpy/core/include/numpy \
|
||||||
|
@ -38,13 +35,17 @@ post_install() {
|
||||||
ln -sfr ${DESTDIR}/usr/lib/python3.4/site-packages/numpy/core/include/numpy \
|
ln -sfr ${DESTDIR}/usr/lib/python3.4/site-packages/numpy/core/include/numpy \
|
||||||
${DESTDIR}/usr/include/python3.4m
|
${DESTDIR}/usr/include/python3.4m
|
||||||
|
|
||||||
# install f2py*.1 man pages and license
|
# create versioned man pages
|
||||||
vman doc/f2py/f2py.1
|
vman doc/f2py/f2py.1 f2py2.7.1
|
||||||
vman doc/f2py/f2py.1 f2py3.4.1
|
vman doc/f2py/f2py.1 f2py3.4.1
|
||||||
|
|
||||||
vlicense LICENSE.txt LICENSE
|
vlicense LICENSE.txt LICENSE
|
||||||
}
|
}
|
||||||
|
|
||||||
python3.4-numpy_package() {
|
python3.4-numpy_package() {
|
||||||
|
alternatives="
|
||||||
|
numpy:f2py:/usr/bin/f2py3.4
|
||||||
|
numpy:f2py.1:/usr/share/man/man1/f2py3.4.1"
|
||||||
pycompile_version="3.4"
|
pycompile_version="3.4"
|
||||||
pycompile_module="numpy"
|
pycompile_module="numpy"
|
||||||
short_desc="${short_desc/Python2/Python3.4}"
|
short_desc="${short_desc/Python2/Python3.4}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue