mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-11 19:44:38 +08:00
79 lines
3.0 KiB
Bash
79 lines
3.0 KiB
Bash
#
|
|
# Platform packages for Chakra, part of chakra-project.org
|
|
#
|
|
# Maintainer: H W Tovetjärn (totte) <totte@tott.es>
|
|
# Contributors: A Boersma (abveritas) <abveritas@chakra-project.org>
|
|
# Jan de Groot <jgc@archlinux.org>
|
|
# Douglas Soares de Andrade <dsa@aur.archlinux.org>
|
|
# Angel Velasquez <angvp@archlinux.com.ve>
|
|
|
|
pkgbase=python-numpy
|
|
pkgname=('python3-numpy' 'python2-numpy')
|
|
pkgver=1.7.1
|
|
pkgrel=2
|
|
pkgdesc="Scientific tools for Python"
|
|
arch=('x86_64')
|
|
license=('custom')
|
|
url="http://www.numpy.org/"
|
|
# depends=('blas' 'lapack' 'python2')
|
|
makedepends=('lapack' 'python3' 'python2' 'python3-distribute' 'python2-distribute' 'python3-nose' 'python2-nose' 'gcc-fortran')
|
|
# optdepends=('python2-nose: test suite')
|
|
# provides=('python-numeric')
|
|
# conflicts=('python-numeric')
|
|
# replaces=('python-numeric')
|
|
source=("http://downloads.sourceforge.net/numpy/numpy-${pkgver}.tar.gz")
|
|
sha512sums=('d58177f3971b6d07baf6f81a2088ba371c7e43ea64ee7ada261da97c6d725b4bd4927122ac373c55383254e4e31691939276dab08a79a238bfa55172a3eff684')
|
|
|
|
build() {
|
|
cd "${srcdir}"
|
|
cp -a "numpy-${pkgver}" "numpy-python2-${pkgver}"
|
|
export ATLAS=None
|
|
export LDFLAGS="$LDFLAGS -shared"
|
|
|
|
msg "Building Python 2 version"
|
|
cd "${srcdir}/numpy-python2-${pkgver}"
|
|
python2 setup.py config_fc --fcompiler=gnu95 build
|
|
|
|
msg "Building Python 3 version"
|
|
cd "${srcdir}/numpy-${pkgver}"
|
|
python3 setup.py config_fc --fcompiler=gnu95 build
|
|
}
|
|
|
|
|
|
package_python2-numpy() {
|
|
depends=('blas' 'lapack' 'python2')
|
|
optdepends=('python2-nose: testsuite')
|
|
|
|
_pyver=2.7
|
|
export ATLAS=None
|
|
export LDFLAGS="$LDFLAGS -shared"
|
|
cd "${srcdir}/numpy-py2-${pkgver}"
|
|
python2 setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1
|
|
install -m755 -d "${pkgdir}/usr/share/licenses/python2-numpy"
|
|
install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-numpy/"
|
|
sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
|
|
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
|
|
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
|
|
$(find ${pkgdir} -name '*.py')
|
|
install -m755 -d "${pkgdir}/usr/include/python${_pyver}"
|
|
ln -sf /usr/lib/python${_pyver}/site-packages/numpy/core/include/numpy "${pkgdir}/usr/include/python${_pyver}/numpy"
|
|
}
|
|
|
|
package_python3-numpy() {
|
|
depends=('blas' 'lapack' 'python3')
|
|
provides=("python3-numpy=${pkgver}")
|
|
replaces=('python3-numpy')
|
|
conflicts=('python3-numpy')
|
|
|
|
_pyver=3.3
|
|
_pyinc=3.3m
|
|
export ATLAS=None
|
|
export LDFLAGS="$LDFLAGS -shared"
|
|
cd "${srcdir}/numpy-${pkgver}"
|
|
python3 setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root="${pkgdir}" --optimize=1
|
|
install -m755 -d "${pkgdir}/usr/share/licenses/python-numpy"
|
|
install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-numpy/"
|
|
install -m755 -d "${pkgdir}/usr/include/python${_pyinc}"
|
|
ln -sf /usr/lib/python${_pyver}/site-packages/numpy/core/include/numpy "${pkgdir}/usr/include/python${_pyinc}/numpy"
|
|
}
|