summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMonson Shao2020-07-26 14:53:35 +0800
committerMonson Shao2020-07-26 14:53:35 +0800
commit60ad4d79cc8864d51352f00922683b88feee6a98 (patch)
treeacfcfba43c8427d0750e02cd6c452bd7ad259c4e
parentbeded19bf613987f367e13ef19aafde57b97824d (diff)
downloadaur-60ad4d79cc8864d51352f00922683b88feee6a98.tar.gz
update to 1.9.1 and use gcc
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD107
-rw-r--r--__init__2.py.patch7
-rw-r--r--__init__3.py.patch7
-rw-r--r--intel.py221
-rw-r--r--intelccompiler.py43
-rw-r--r--intelccompiler.py.patch20
-rw-r--r--site32.cfg6
-rw-r--r--site64.cfg6
9 files changed, 41 insertions, 408 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e89a58f7bc4a..e999594a3c77 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,31 +1,23 @@
pkgbase = python-numpy-mkl
- pkgdesc = Scientific tools for Python compiled with intel mkl
- pkgver = 1.18.1
+ pkgdesc = Scientific tools for Python, compiled with intel mkl
+ pkgver = 1.19.1
pkgrel = 1
url = http://numpy.scipy.org/
- arch = i686
arch = x86_64
+ arch = i686
license = custom
+ checkdepends = python-pytest
+ checkdepends = python-hypothesis
makedepends = python-setuptools
- makedepends = intel-compiler-base
- makedepends = intel-fortran-compiler
- makedepends = cython
+ makedepends = gcc-fortran
+ makedepends = cython>=0.29.21
+ depends = python>=3.6
depends = intel-mkl
- depends = python
+ provides = python-numpy=1.19.1
+ conflicts = python-numpy
options = staticlibs
- source = https://github.com/numpy/numpy/archive/v1.18.1.tar.gz
- source = site64.cfg
- source = site32.cfg
- source = intelccompiler.py.patch
- sha256sums = 96af6ec6c24e2df0d1591076a102b36bcc0c622411cbb191bca9a1ae724c4606
- sha256sums = 86cd68a695a5e1d76f8e53cda70c888c4ed04349f15c8096d4492e346e7187e1
- sha256sums = 882f2717deca0fd6a2e2384aac2dc7973c566f9cd2ba46777c3b5ffdffa814df
- sha256sums = 0d185daf0f2fcab08778173f54cee86cd88dc3c6703413686ab3742c0097db4e
+ source = https://github.com/numpy/numpy/releases/download/v1.19.1/numpy-1.19.1.tar.gz
+ sha256sums = 1396e6c3d20cbfc119195303b0272e749610b7042cc498be4134f013e9a3215c
pkgname = python-numpy-mkl
- depends = intel-mkl
- depends = python
- optdepends = python-pytest: testsuite
- provides = python-numpy=1.18.1
- conflicts = python-numpy
diff --git a/PKGBUILD b/PKGBUILD
index 7468c6043753..a3e75b6ebcdf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,94 +5,45 @@
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
# Adapted to mkl by Simone Riva
+
pkgname=python-numpy-mkl
-pkgver=1.18.1
+pkgver=1.19.1
pkgrel=1
-pkgdesc="Scientific tools for Python compiled with intel mkl"
-arch=('i686' 'x86_64')
+pkgdesc="Scientific tools for Python, compiled with intel mkl"
+arch=('x86_64' 'i686')
license=('custom')
-options=('staticlibs')
url="http://numpy.scipy.org/"
-depends=('intel-mkl' 'python')
-makedepends=('python-setuptools' 'intel-compiler-base' 'intel-fortran-compiler' 'cython')
-
-source=(https://github.com/numpy/numpy/archive/v${pkgver}.tar.gz
- 'site64.cfg'
- 'site32.cfg'
- 'intelccompiler.py.patch')
+provides=("python-numpy=$pkgver")
+conflicts=('python-numpy')
+depends=('python>=3.6' 'intel-mkl')
+makedepends=('python-setuptools' 'gcc-fortran' 'cython>=0.29.21')
+checkdepends=('python-pytest' 'python-hypothesis')
+options=('staticlibs')
+source=("https://github.com/numpy/numpy/releases/download/v$pkgver/numpy-$pkgver.tar.gz")
+sha256sums=('1396e6c3d20cbfc119195303b0272e749610b7042cc498be4134f013e9a3215c')
-sha256sums=('96af6ec6c24e2df0d1591076a102b36bcc0c622411cbb191bca9a1ae724c4606'
- '86cd68a695a5e1d76f8e53cda70c888c4ed04349f15c8096d4492e346e7187e1'
- '882f2717deca0fd6a2e2384aac2dc7973c566f9cd2ba46777c3b5ffdffa814df'
- '0d185daf0f2fcab08778173f54cee86cd88dc3c6703413686ab3742c0097db4e')
+prepare() {
+ export MKLROOT=/opt/intel/mkl
+}
build() {
- #cd "${srcdir}"
-
- patch ${srcdir}/numpy-${pkgver}/numpy/distutils/intelccompiler.py < ${srcdir}/intelccompiler.py.patch
- # set by hand this flag if you want to compile with gcc
- #force_gcc=false
-
- #if hash icc; then
- # use_intel_cc=true
- # use_gcc=false
- #else
- # use_intel_cc=false
- # use_gcc=true
- #fi
-
- #if [ "$force_gcc" = true ]; then
- # use_intel_cc=false
- # use_gcc=true
- #fi
-
- if [ "$CARCH" = "i686" ]; then
- cp ${srcdir}/site32.cfg ${srcdir}/site.cfg
- _compiler=intel
- else
- cp ${srcdir}/site64.cfg ${srcdir}/site.cfg
- _compiler=intelem
- fi
-
- export Atlas=None
- #export LDFLAGS="$LDFLAGS -shared" # makes no difference
-
- #if [ "$use_gcc" = true ]; then
- # export CFLAGS="-fopenmp -m64 -mtune=native -O3 -Wl,--no-as-needed"
- # export CXXFLAGS="-fopenmp -m64 -mtune=native -O3 -Wl,--no-as-needed"
- # export LDFLAGS="-ldl -lm"
- # export FFLAGS="-fopenmp -m64 -mtune=native -O3"
- #fi
-
- #if [ "$use_intel_cc" = true ]; then
- # export __INTEL_PRE_CFLAGS="$__INTEL_PRE_CFLAGS -D__PURE_INTEL_C99_HEADERS__ -D_Float32=float -D_Float64=double -D_Float128=\"long double\" -D_Float32x=_Float64 -D_Float64x=_Float128"
- #fi
-
- echo "Building Python3"
- cd "${srcdir}"
- cp ${srcdir}/site.cfg "${srcdir}/numpy-${pkgver}"
- cd "${srcdir}/numpy-${pkgver}"
-
- #if [ "$use_intel_cc" = true ]; then
- python setup.py config --compiler=${_compiler} build_clib --compiler=${_compiler} build_ext --compiler=${_compiler}
- #fi
-
- #if [ "$use_gcc" = true ]; then
- # python setup.py config build_clib build_ext
- #fi
-
+ cd numpy-$pkgver
+ python setup.py build
}
-package_python-numpy-mkl() {
+check() {
+ # TODO: Fix fortran tests here (it works fine after installation)
- depends=('intel-mkl' 'python')
- provides=("python-numpy=${pkgver}")
- conflicts=('python-numpy')
- optdepends=('python-pytest: testsuite')
+ cd numpy-$pkgver
+ python setup.py install --root="$PWD/tmp_install" --optimize=1
+ cd "$PWD/tmp_install"
+ PATH="$PWD/usr/bin:$PATH" PYTHONPATH="$PWD/usr/lib/python3.8/site-packages:$PYTHONPATH" python -c 'import numpy; numpy.test()'
+}
- cd "${srcdir}/numpy-${pkgver}"
- python setup.py config_fc install --prefix=/usr --root="${pkgdir}" --optimize=2
+package() {
+ cd numpy-$pkgver
+ python setup.py 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/share/licenses/python-numpy"
+ install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-numpy/"
}
diff --git a/__init__2.py.patch b/__init__2.py.patch
deleted file mode 100644
index 9e7171f03993..000000000000
--- a/__init__2.py.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-432,433c432,434
-< raise CompilerNotFound()
-< return version
----
-> pass
-> #raise CompilerNotFound()
-> return '18.0'
diff --git a/__init__3.py.patch b/__init__3.py.patch
deleted file mode 100644
index 9e7171f03993..000000000000
--- a/__init__3.py.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-432,433c432,434
-< raise CompilerNotFound()
-< return version
----
-> pass
-> #raise CompilerNotFound()
-> return '18.0'
diff --git a/intel.py b/intel.py
deleted file mode 100644
index eb6150201c2e..000000000000
--- a/intel.py
+++ /dev/null
@@ -1,221 +0,0 @@
-# http://developer.intel.com/software/products/compilers/flin/
-from __future__ import division, absolute_import, print_function
-
-import sys
-
-from numpy.distutils.ccompiler import simple_version_match
-from numpy.distutils.fcompiler import FCompiler, dummy_fortran_file
-
-compilers = ['IntelFCompiler', 'IntelVisualFCompiler',
- 'IntelItaniumFCompiler', 'IntelItaniumVisualFCompiler',
- 'IntelEM64VisualFCompiler', 'IntelEM64TFCompiler']
-
-
-def intel_version_match(type):
- # Match against the important stuff in the version string
- return simple_version_match(start=r'Intel.*?Fortran.*?(?:%s).*?Version' % (type,))
-
-
-class BaseIntelFCompiler(FCompiler):
- def update_executables(self):
- f = dummy_fortran_file()
- self.executables['version_cmd'] = ['<F77>', '-FI', '-V', '-c',
- f + '.f', '-o', f + '.o']
-
- def runtime_library_dir_option(self, dir):
- return '-Wl,-rpath="%s"' % dir
-
-
-class IntelFCompiler(BaseIntelFCompiler):
-
- compiler_type = 'intel'
- compiler_aliases = ('ifort',)
- description = 'Intel Fortran Compiler for 32-bit apps'
- version_match = intel_version_match('32-bit|IA-32')
-
- possible_executables = ['ifort', 'ifc']
-
- executables = {
- 'version_cmd' : None, # set by update_executables
- 'compiler_f77' : [None, "-72", "-w90", "-w95"],
- 'compiler_f90' : [None],
- 'compiler_fix' : [None, "-FI"],
- 'linker_so' : ["<F90>", "-shared"],
- 'archiver' : ["ar", "-cr"],
- 'ranlib' : ["ranlib"]
- }
-
- pic_flags = ['-fPIC']
- module_dir_switch = '-module ' # Don't remove ending space!
- module_include_switch = '-I'
-
- def get_flags_free(self):
- return ['-FR']
-
- def get_flags(self):
- return ['-fPIC']
-
- def get_flags_opt(self): # Scipy test failures with -O2
- v = self.get_version()
- mpopt = 'openmp' if v and int(v.split('.')[0]) < 15 else 'qopenmp'
- return ['-xhost -fp-model strict -O1 -{}'.format(mpopt)]
-
- def get_flags_arch(self):
- return []
-
- def get_flags_linker_so(self):
- opt = FCompiler.get_flags_linker_so(self)
- v = self.get_version()
- if v and v >= '8.0':
- opt.append('-nofor_main')
- if sys.platform == 'darwin':
- # Here, it's -dynamiclib
- try:
- idx = opt.index('-shared')
- opt.remove('-shared')
- except ValueError:
- idx = 0
- opt[idx:idx] = ['-dynamiclib', '-Wl,-undefined,dynamic_lookup']
- return opt
-
-
-class IntelItaniumFCompiler(IntelFCompiler):
- compiler_type = 'intele'
- compiler_aliases = ()
- description = 'Intel Fortran Compiler for Itanium apps'
-
- version_match = intel_version_match('Itanium|IA-64')
-
- possible_executables = ['ifort', 'efort', 'efc']
-
- executables = {
- 'version_cmd' : None,
- 'compiler_f77' : [None, "-FI", "-w90", "-w95"],
- 'compiler_fix' : [None, "-FI"],
- 'compiler_f90' : [None],
- 'linker_so' : ['<F90>', "-shared"],
- 'archiver' : ["ar", "-cr"],
- 'ranlib' : ["ranlib"]
- }
-
-
-class IntelEM64TFCompiler(IntelFCompiler):
- compiler_type = 'intelem'
- compiler_aliases = ()
- description = 'Intel Fortran Compiler for 64-bit apps'
-
- version_match = intel_version_match('EM64T-based|Intel\\(R\\) 64|64|IA-64|64-bit')
-
- possible_executables = ['ifort', 'efort', 'efc']
-
- executables = {
- 'version_cmd' : None,
- 'compiler_f77' : [None, "-FI"],
- 'compiler_fix' : [None, "-FI"],
- 'compiler_f90' : [None],
- 'linker_so' : ['<F90>', "-shared"],
- 'archiver' : ["ar", "-cr"],
- 'ranlib' : ["ranlib"]
- }
-
- def get_flags(self):
- return ['-fPIC']
-
- def get_flags_opt(self): # Scipy test failures with -O2
- v = self.get_version()
- mpopt = 'openmp' if v and int(v.split('.')[0]) < 15 else 'qopenmp'
- return ['-fp-model strict -O1 -{}'.format(mpopt)]
-
- def get_flags_arch(self):
- return ['']
-
-# Is there no difference in the version string between the above compilers
-# and the Visual compilers?
-
-
-class IntelVisualFCompiler(BaseIntelFCompiler):
- compiler_type = 'intelv'
- description = 'Intel Visual Fortran Compiler for 32-bit apps'
- version_match = intel_version_match('32-bit|IA-32')
-
- def update_executables(self):
- f = dummy_fortran_file()
- self.executables['version_cmd'] = ['<F77>', '/FI', '/c',
- f + '.f', '/o', f + '.o']
-
- ar_exe = 'lib.exe'
- possible_executables = ['ifort', 'ifl']
-
- executables = {
- 'version_cmd' : None,
- 'compiler_f77' : [None],
- 'compiler_fix' : [None],
- 'compiler_f90' : [None],
- 'linker_so' : [None],
- 'archiver' : [ar_exe, "/verbose", "/OUT:"],
- 'ranlib' : None
- }
-
- compile_switch = '/c '
- object_switch = '/Fo' # No space after /Fo!
- library_switch = '/OUT:' # No space after /OUT:!
- module_dir_switch = '/module:' # No space after /module:
- module_include_switch = '/I'
-
- def get_flags(self):
- opt = ['/nologo', '/MD', '/nbs', '/names:lowercase', '/assume:underscore']
- return opt
-
- def get_flags_free(self):
- return []
-
- def get_flags_debug(self):
- return ['/4Yb', '/d2']
-
- def get_flags_opt(self):
- return ['/O1'] # Scipy test failures with /O2
-
- def get_flags_arch(self):
- return ["/arch:IA32", "/QaxSSE3"]
-
- def runtime_library_dir_option(self, dir):
- raise NotImplementedError
-
-
-class IntelItaniumVisualFCompiler(IntelVisualFCompiler):
- compiler_type = 'intelev'
- description = 'Intel Visual Fortran Compiler for Itanium apps'
-
- version_match = intel_version_match('Itanium')
-
- possible_executables = ['efl'] # XXX this is a wild guess
- ar_exe = IntelVisualFCompiler.ar_exe
-
- executables = {
- 'version_cmd' : None,
- 'compiler_f77' : [None, "-FI", "-w90", "-w95"],
- 'compiler_fix' : [None, "-FI", "-4L72", "-w"],
- 'compiler_f90' : [None],
- 'linker_so' : ['<F90>', "-shared"],
- 'archiver' : [ar_exe, "/verbose", "/OUT:"],
- 'ranlib' : None
- }
-
-
-class IntelEM64VisualFCompiler(IntelVisualFCompiler):
- compiler_type = 'intelvem'
- description = 'Intel Visual Fortran Compiler for 64-bit apps'
-
- version_match = simple_version_match(start=r'Intel\(R\).*?64,')
-
- def get_flags_arch(self):
- return ['']
-
-
-if __name__ == '__main__':
- from distutils import log
- log.set_verbosity(2)
- from numpy.distutils.fcompiler import new_fcompiler
- compiler = new_fcompiler(compiler='intel')
- compiler.customize()
- print(compiler.get_version())
diff --git a/intelccompiler.py b/intelccompiler.py
deleted file mode 100644
index a3a35a629a30..000000000000
--- a/intelccompiler.py
+++ /dev/null
@@ -1,43 +0,0 @@
-from distutils.unixccompiler import UnixCCompiler
-from numpy.distutils.exec_command import find_executable
-
-class IntelCCompiler(UnixCCompiler):
- """ A modified Intel compiler compatible with an gcc built Python."""
- compiler_type = 'intel'
- cc_exe = 'icc -O3 -fPIC -fp-model strict -fomit-frame-pointer -openmp -xHost'
- cc_args = 'fPIC'
-
- def __init__ (self, verbose=0, dry_run=0, force=0):
- UnixCCompiler.__init__ (self, verbose,dry_run, force)
- self.cc_exe = 'icc -O3 -fPIC -fp-model strict -fomit-frame-pointer -openmp -xHost -w '
- compiler = self.cc_exe
- self.set_executables(compiler=compiler,
- compiler_so=compiler,
- compiler_cxx=compiler,
- linker_exe=compiler,
- linker_so=compiler + ' -shared')
-
-class IntelItaniumCCompiler(IntelCCompiler):
- compiler_type = 'intele'
-
- # On Itanium, the Intel Compiler used to be called ecc, let's search for
- # it (now it's also icc, so ecc is last in the search).
- for cc_exe in map(find_executable,['icc','ecc']):
- if cc_exe:
- break
-
-class IntelEM64TCCompiler(UnixCCompiler):
- """ A modified Intel x86_64 compiler compatible with a 64bit gcc built Python.
- """
- compiler_type = 'intelem'
- cc_exe = 'icc -O3 -fPIC -fp-model strict -fomit-frame-pointer -openmp -xHost -m64 -w '
- cc_args = "-fPIC"
- def __init__ (self, verbose=0, dry_run=0, force=0):
- UnixCCompiler.__init__ (self, verbose,dry_run, force)
- self.cc_exe = 'icc -O3 -fPIC -fp-model strict -fomit-frame-pointer -openmp -xHost -m64 -w '
- compiler = self.cc_exe
- self.set_executables(compiler=compiler,
- compiler_so=compiler,
- compiler_cxx=compiler,
- linker_exe=compiler,
- linker_so=compiler + ' -shared')
diff --git a/intelccompiler.py.patch b/intelccompiler.py.patch
deleted file mode 100644
index 75a94ad50629..000000000000
--- a/intelccompiler.py.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- intelccompiler.py 2019-01-31 20:54:00.000000000 +0000
-+++ _intelccompiler.py 2019-02-04 22:33:34.047063292 +0000
-@@ -20,7 +20,7 @@
-
- v = self.get_version()
- mpopt = 'openmp' if v and v < '15' else 'qopenmp'
-- self.cc_exe = ('icc -fPIC -fp-model strict -O3 '
-+ self.cc_exe = ('icc -xHost -fPIC -fp-model strict -O3 '
- '-fomit-frame-pointer -{}').format(mpopt)
- compiler = self.cc_exe
-
-@@ -60,7 +60,7 @@
-
- v = self.get_version()
- mpopt = 'openmp' if v and v < '15' else 'qopenmp'
-- self.cc_exe = ('icc -m64 -fPIC -fp-model strict -O3 '
-+ self.cc_exe = ('icc -xHost -m64 -fPIC -fp-model strict -O3 '
- '-fomit-frame-pointer -{}').format(mpopt)
- compiler = self.cc_exe
-
diff --git a/site32.cfg b/site32.cfg
deleted file mode 100644
index 7d7bb072eb1f..000000000000
--- a/site32.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-[mkl]
-library_dirs = /opt/intel/mkl/lib/ia32
-include_dirs = /opt/intel/mkl/include
-mkl_libs = mkl_rt
-lapack_libs =
-
diff --git a/site64.cfg b/site64.cfg
deleted file mode 100644
index fa8ff72b665e..000000000000
--- a/site64.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-[mkl]
-library_dirs = /opt/intel/mkl/lib/intel64/
-include_dirs = /opt/intel/mkl/include
-mkl_libs = mkl_rt
-lapack_libs =
-