summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD125
1 files changed, 45 insertions, 80 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f81afcc1ddbc..83e96c862b49 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,5 @@
-# Maintainer: Thomas Dziedzic < gostrc at gmail >
+# Maintainer: Jingbei Li <i@jingbei.li>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
# Contributor: Ray Rashif <schiv@archlinux.org>
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
@@ -7,7 +8,7 @@
pkgbase='python-scipy-mkl'
pkgname=('python-scipy-mkl' 'python2-scipy-mkl')
-pkgver=1.1.0
+pkgver=1.2.0
pkgrel=1
pkgdesc="SciPy is open-source software for mathematics, science, and engineering."
arch=('i686' 'x86_64')
@@ -15,75 +16,55 @@ url="http://www.scipy.org/"
license=('BSD')
depends=('intel-compiler-base' 'intel-fortran-compiler' 'intel-mkl')
makedepends=('gcc-fortran' 'python-numpy' 'python2-numpy' 'python-setuptools' 'python2-setuptools' 'intel-compiler-base' 'intel-fortran-compiler' 'intel-mkl')
-checkdepends=('python-nose' 'python2-nose')
+checkdepends=('python-pytest' 'python2-pytest')
source=(
"https://github.com/scipy/scipy/releases/download/v${pkgver}/scipy-${pkgver}.tar.gz"
"build_python.sh"
+ 'fix-utf8.patch'
)
-sha256sums=('878352408424dffaa695ffedf2f9f92844e116686923ed9aa8626fc30d32cfd1'
- '4970774d5c0b43c48634b01c1eabf7604dc3c98177fb5fed5585dc5be71183b4')
+sha256sums=('51a2424c8ed80e60bdb9a896806e7adaf24a58253b326fbad10f80a6d06f2214'
+ '541bade4ce71fc139594a7e025923916ec37a7fdbf5e4aec4b86abedf439395c'
+ '8095c3ed80658019f8976ff7e298ac80939b3c2814dfdd372d63c04a285d419e')
-build() {
- # glibc 2.18 compatibility issue
- cp /opt/intel/compilers_and_libraries_*/linux/compiler/include/math.h .
- sed \
- -e '173s/.*/# include "\/usr\/include\/math.h"/' \
- -e '1218s/!//' \
- -i math.h
- export __INTEL_PRE_CFLAGS="-I$srcdir "
-
- export LDFLAGS="-Wall -shared"
+prepare() {
+ cd scipy-${pkgver}
+ # Fix unicode issues that prevent importing scipy.stats on py2
+ patch -p1 -i ../fix-utf8.patch
- # set by hand this flag if you want to compile with gcc
- export force_gcc=false
+ cd ${srcdir}
+ cp -r scipy-${pkgver} scipy-${pkgver}-py2
+ for file in $(find scipy-${pkgver}-py2 -name '*.py' -print); do
+ sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
+ sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
+ done
- if hash icc; then
- export use_intel_cc=true
- export use_gcc=false
- else
- export use_intel_cc=false
- export use_gcc=true
- fi
+ cp build_python.sh scipy-${pkgver}
+ cp build_python.sh scipy-${pkgver}-py2
+}
- if [ "$force_gcc" = true ]; then
- export use_intel_cc=false
- export use_gcc=true
- fi
+build() {
+ # glibc 2.18 compatibility issue
+ # cp /opt/intel/compilers_and_libraries_*/linux/compiler/include/math.h .
+ # sed \
+ # -e '173s/.*/# include "\/usr\/include\/math.h"/' \
+ # -e '1218s/!//' \
+ # -i math.h
+ # export __INTEL_PRE_CFLAGS="-I$srcdir "
- # copy python3 build files
- cp build_python.sh scipy-${pkgver}
+ export LDFLAGS="-Wall -shared"
+ export use_intel_cc=true
+ export use_gcc=false
- # copy python2 build files
- cp -r scipy-${pkgver} scipy-${pkgver}-py2
- cp build_python.sh scipy-${pkgver}-py2
# build for python3
cd scipy-${pkgver}
- if [ "$use_gcc" = true ]; then
- python3 setup.py --fcompiler=gnu95 --compiler=gnu95 build
- fi
-
- if [ "$use_intel_cc" = true ]; then
- #python3 setup.py config --compiler=intelem --fcompiler=intelem build_clib --compiler=intelem --fcompiler=intelem build_ext --compiler=intelem --fcompiler=intelem
- sh build_python.sh python
- fi
+ python3 setup.py config --compiler=intelem --fcompiler=intelem build_clib --compiler=intelem --fcompiler=intelem build_ext --compiler=intelem --fcompiler=intelem
+ #sh build_python.sh python
# build for python2
cd ../scipy-${pkgver}-py2
-
- for file in $(find . -name '*.py' -print); do
- sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
- sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
- done
-
- if [ "$use_gcc" = true ]; then
- python2 setup.py --fcompiler=gnu95 --compiler=gnu95 build
- fi
-
- if [ "$use_intel_cc" = true ]; then
- #python2 setup.py config --compiler=intelem --fcompiler=intelem build_clib --compiler=intelem --fcompiler=intelem build_ext --compiler=intelem --fcompiler=intelem
- sh build_python.sh python2
- fi
+ python2 setup.py config --compiler=intelem --fcompiler=intelem build_clib --compiler=intelem --fcompiler=intelem build_ext --compiler=intelem --fcompiler=intelem
+ #sh build_python.sh python2
}
@@ -93,14 +74,14 @@ build() {
# export LDFLAGS="-Wall -shared"
#
# cd ${srcdir}/scipy-${pkgver}
-# python3 setup.py config_fc --fcompiler=gnu95 install \
+# python3 setup.py config_fc --compiler=intelem --fcompiler=intelem install \
# --prefix=/usr --root=${srcdir}/test --optimize=1
-# export PYTHONPATH=${srcdir}/test/usr/lib/python3.6/site-packages
+# export PYTHONPATH=${srcdir}/test/usr/lib/python3.7/site-packages
# cd ${srcdir}
# python -c "from scipy import test; test('full')"
#
# cd ${srcdir}/scipy-${pkgver}-py2
-# python2 setup.py config_fc --fcompiler=gnu95 install \
+# python2 setup.py config_fc --compiler=intelem --fcompiler=intelem install \
# --prefix=/usr --root=${srcdir}/test --optimize=1
# export PYTHONPATH=${srcdir}/test/usr/lib/python2.7/site-packages
# cd ${srcdir}
@@ -108,46 +89,30 @@ build() {
#}
package_python-scipy-mkl() {
-
- depends+=('python-numpy' 'qhull' 'python-nose')
- provides=('python3-scipy=${pkgver}' 'python-scipy=${pkgver}' 'scipy=${pkgver}')
- replaces=('python-scipy')
+ depends+=('python-numpy')
+ provides=('python3-scipy' 'scipy')
conflicts=('python-scipy')
optdepends=('python-pillow: for image saving module')
cd scipy-${pkgver}
export LDFLAGS="-Wall -shared"
- if [ "$use_gcc" = true ]; then
- python3 setup.py config --fcompiler=gnu95 --compiler=gnu95 install --prefix=/usr --root="${pkgdir}/" --optimize=1
- fi
-
- if [ "$use_intel_cc" = true ]; then
- python3 setup.py config --fcompiler=intelem --compiler=intelem install --prefix=/usr --root="${pkgdir}/" --optimize=1
- fi
+ python3 setup.py config --compiler=intelem --fcompiler=intelem install --prefix=/usr --root="${pkgdir}/" --optimize=1
install -Dm644 LICENSE.txt \
"${pkgdir}/usr/share/licenses/python-scipy/LICENSE"
}
package_python2-scipy-mkl() {
-
- depends+=('python2-numpy' 'qhull' 'python2-nose')
- provides=('python2-scipy=${pkgver}' 'python2-scipy=${pkgver}' 'scipy=${pkgver}')
- replaces=('python2-scipy')
+ depends+=('python2-numpy')
+ provides=('python2-scipy' 'scipy')
conflicts=('python2-scipy')
optdepends=('python2-pillow: for image saving module')
cd scipy-${pkgver}-py2
export LDFLAGS="-Wall -shared"
- if [ "$use_gcc" = true ]; then
- python2 setup.py config --fcompiler=gnu95 --compiler=gnu95 install --prefix=/usr --root="${pkgdir}/" --optimize=1
- fi
-
- if [ "$use_intel_cc" = true ]; then
- python2 setup.py config --fcompiler=intelem --compiler=intelem install --prefix=/usr --root="${pkgdir}/" --optimize=1
- fi
+ python2 setup.py config --compiler=intelem --fcompiler=intelem install --prefix=/usr --root="${pkgdir}/" --optimize=1
install -Dm644 LICENSE.txt \
"${pkgdir}/usr/share/licenses/python2-scipy/LICENSE"