Commit 57222136 authored by José Mª. Fernández's avatar José Mª. Fernández

numpy has been updated

parent c96cbae4
AUX numpy-1.11.1-no-hardcode-blas.patch 3403 BLAKE2B a70d60a0f0b9bea3c24818c46ee243c07bf35e053327d9303ef043a69dca5fb0e738cee5896a06551ef506690b79a2bf33dfb7c1036fc33befdbb7d7f75db31a SHA512 0b32bf8e6fe08d139a589f5ca6a6d7d80716712f3cebcd84574ba5e90b283df84765d492f18e1fe3712aec6dbd6881a1b03e157e1cd6d42d6cd37022a62597aa
AUX numpy-1.11.2-import-module-fix.patch 932 BLAKE2B a65c7cf8e43218fde178921b8380fac80746eebbc141846aeae1bd46c7b0bfd83083d55ccbc924f7f26db0ccc5fa6b06928039743c6b7fff5acf55cdb908081a SHA512 5f4b72cbab6a577490b029f3be5cbdacb0f161a26c20a37e1c924e5a9ba6403098de85cf578567292b31eb0a07c9f5ac6053f12c623e00e26605b6cc2f67ffe3
AUX numpy-1.11.2_xlocale.patch 417 BLAKE2B 06bcccd5575e4ef4ac57a94cd27c31079d5ab2a0e822b9dfdc0139a0cd3504f2663865116d08cc1e9670088e5a782a253b4ca0025d7c4322a3eee36722ae1b1d SHA512 b6915c850e6e4fdc2f29014a21e8eb48849290ab81029c0aada877cffaf92d8a77cda6ef54734a23c1d3e6d8230da707d7ccea16e161ea723bdee399ed739c4f
AUX numpy-1.14.5-no-hardcode-blas.patch 3767 BLAKE2B f580a067b9c91a53f99daffd33f38306abb3d2852f4d513152531fb0796f50371c9031b7c685fd35801afbe2a5b649efd4d2cdca9c239f119893b1fde19bda3b SHA512 66a7d9988ab3e6f5b1788df7db9d81719c43ba641edc3450a4912c46aaf0ffb3ba6030dc458182adfb11eafac91f2ba6e1c5aa9b8eb077d6d8c776b2ec5ad2fc
AUX numpy-1.14.5-py37.patch 5417 BLAKE2B a6660b06a6f5ebc436b8bef4f53934892384889304f3b48ed1e9e84298deb78528e431e2102856fe1bc44b5e9a472b3a0b51401ad824b7072465d8c54f6aa939 SHA512 78b6a1640cf51e9b58478fd9ad5044bec2efc1319cc050f0a1345fc367b57b9170954ce25b88b2851007b438a00ac380eab48f6b699fed1115d109972ec553ad
DIST numpy-1.11.2.tar.gz 4178447 BLAKE2B c3d7b3e9dced3a2a6f42ffd79f3cd04015e41cd0088150765078d241615d5b21f1d9f2c16b59081345bc7a174f1614f0acb6066ea9f73c65a2fe94a30e7d701e SHA512 c1818de5c8b92cc2a673149f090cc863b484afd29e8a014ffcf8d0f5e70cf8886c7662dbe45847712dec8ae0412d1cb48b13cceefe3e4ec0e85bb20e4beaa46e
DIST numpy-1.14.5.zip 4904624 BLAKE2B 14d266bf1139b9539e39d08a6537e2b772e80bf46a0769cbb06b63ba54858c9284f6d0e8a19627a4d99f2c2638e9a4031bf4d4aaf773eaf34b7203d131636dc0 SHA512 e131f9fa815084e334b59c5d9abd8de0088ad1dfefecf8615ad7deca0b54b0dfa0446c8de99c90670ea9fcabea9980bd171618a5b9032c1937b597a5ce363c5b
DIST numpy-html-1.11.0.zip 9879611 BLAKE2B 01f9fefcb71fe22d694af6a117da19e79c983c0f68f9e81fd060f4cb6dec6d13ba8e2354ed6040da58796a05c5a05dbecc595fbae2d578191ab4bb22f0dace4d SHA512 7bf416030c273c767a98d0f23adef0e5fd05f96f6bb911e32ec88821a5bc7c47a2799d33fb0706cb2d391ea6e47b3e0eef0d789eb1c0d81c982cfaa991a09822
DIST numpy-html-1.14.5.zip 11197881 BLAKE2B 00cac3c5be07f644328acd9ed155a6fc07ed7d7380584732bb3ac03562c8705cd152612f461d5dc251dabe0be4ba45593165a961496e351110e1aa7598c37370 SHA512 578d31660de4e1f57310b3a2137cefea17228f40046eef1689fb6d9302f0fe0fda5aaf473c3b8c69ae781049950022321593ec891a5640e3c36c886ab3bf4383
DIST numpy-ref-1.11.0.pdf 5310792 BLAKE2B 068e6fed91fe15dc9a77bcc50b32b8727fb98ead513f50d4938bc5c09b1c5bcd4e9fd9701cd1b9bf38656692d15f1b98b07801f8b73e1782a8e216f7e15773b8 SHA512 a6bed225428645382846fcd60bc7961a44b0dc24cbfab3b4d0a1cee53092860f9db6226faf6597241ad6b9d6034837aace11214e0fc0c338702a574a9acf28df
DIST numpy-ref-1.14.5.pdf 4855150 BLAKE2B aa924542346bd06b1aa8b11ceb8eb5de936cfdccc10a8339720a297e27b5b34961044eb8db8dd7b9a19ba93b3cbf76ec278a9a50724653aafd2b9d57a00007f2 SHA512 717f58fcb1aa66ecc5f5d4c11c9923d2beb21a1b1a0ca1e46f3622c69f1122fd0547b7f7abaf6de008e2aa988b2453af3c2590877f5596fb6642479ece651746
DIST numpy-user-1.11.0.pdf 555403 BLAKE2B c659a0d8d0587396c9bbf8fbe3ebaf5cb7311f46e99f0e0944efc96e9c38dd3c60fef6346ae1662b923c39955e0c662ec1993b0b2904f04888b2b3d0009b044b SHA512 8287acea5f6981119dfe223ff9cd2fd14f504b9a70418426ab716b80aea670b30249fbd727664ebf72d6d0660a84a57ff027a42cfe67946a7737a4308eebd786
DIST numpy-user-1.14.5.pdf 574418 BLAKE2B 80738f1760932fa74b07334d1a355ba3ce319e0b03fe1428d0b3497466fa1164ccbad84969cb7bc8daebb5525094f0d0c7710e1d661b1c6bbaca0669bfcbf875 SHA512 fb00305408c56ee203ed71ac042474592e7e933f14a639f6dce0f6dc80206c13b844c2425a919f9072a114c7af2c2f9f85b78a07ba3874259e5d173290e51a13
EBUILD numpy-1.11.2-r2.ebuild 4822 BLAKE2B c55f54ff9e3c99ccf6617a600ab91808ac6f184feca8e4f6d85144c783db7b79bb9384f1588a5653661b48568acfe53cf15e77e5ae35c839f1e71bc9790ce5e4 SHA512 be77ac9c97337cee84f3082a3d1e4efb8d917f8785b82525ce7132624b5354995e970852a46729f78ea32e5c2e73e710e3acc3215f0ec9174f46f8f40f76b5af
EBUILD numpy-1.14.5-r1.ebuild 4069 BLAKE2B 623277e579c3f4565ecc1ecc249ff5cac3f53bbee03354db970a4419ee17530a9193f3f56f10501ac1efb00189afb64396dd4512b7840cd81d5d1d30c4b15623 SHA512 f8e5d27c1c8c12c6f00e8c1f63dea06d86c5cb593d650e336de705b666987a9b46949a373dcb30705e1afdcd5ce31a67f9bbbe54511434b0f84d63c864caaea1
MISC metadata.xml 876 BLAKE2B 5e257d6ea3c59c5819d854db7b7db3ebff53b5c87b5ce9348786085f09db12aa6fc8fa86393b9e6c06760ac0d9f36a52fdfb1865c9d1d9ad5526d74d3d53e8b1 SHA512 d35d0954ff8f21e370edeab3ce3e5ab501bf216c93399e807ede6f1910ba0ea41359425bf894d813a39442fb92a724fe83ec8a5c64e6bd97de9422f67700d549
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index 93a8e6f..df3f3f8 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -364,28 +364,7 @@ def get_info(name, notfound_action=0):
1 - display warning message
2 - raise error
"""
- cl = {'atlas': atlas_info, # use lapack_opt or blas_opt instead
- 'atlas_threads': atlas_threads_info, # ditto
- 'atlas_blas': atlas_blas_info,
- 'atlas_blas_threads': atlas_blas_threads_info,
- 'lapack_atlas': lapack_atlas_info, # use lapack_opt instead
- 'lapack_atlas_threads': lapack_atlas_threads_info, # ditto
- 'atlas_3_10': atlas_3_10_info, # use lapack_opt or blas_opt instead
- 'atlas_3_10_threads': atlas_3_10_threads_info, # ditto
- 'atlas_3_10_blas': atlas_3_10_blas_info,
- 'atlas_3_10_blas_threads': atlas_3_10_blas_threads_info,
- 'lapack_atlas_3_10': lapack_atlas_3_10_info, # use lapack_opt instead
- 'lapack_atlas_3_10_threads': lapack_atlas_3_10_threads_info, # ditto
- 'mkl': mkl_info,
- # openblas which may or may not have embedded lapack
- 'openblas': openblas_info, # use blas_opt instead
- # openblas with embedded lapack
- 'openblas_lapack': openblas_lapack_info, # use blas_opt instead
- 'openblas_clapack': openblas_clapack_info, # use blas_opt instead
- 'blis': blis_info, # use blas_opt instead
- 'lapack_mkl': lapack_mkl_info, # use lapack_opt instead
- 'blas_mkl': blas_mkl_info, # use blas_opt instead
- 'x11': x11_info,
+ cl = {'x11': x11_info,
'fft_opt': fft_opt_info,
'fftw': fftw_info,
'fftw2': fftw2_info,
@@ -730,10 +709,7 @@ class system_info(object):
return [b for b in [a.strip() for a in libs.split(',')] if b]
def get_libraries(self, key='libraries'):
- if hasattr(self, '_lib_names'):
- return self.get_libs(key, default=self._lib_names)
- else:
- return self.get_libs(key, '')
+ return self.get_libs(key, '')
def library_extensions(self):
c = customized_ccompiler()
@@ -1740,7 +1716,7 @@ class blas_info(system_info):
lib = self.has_cblas(info)
if lib is not None:
info['language'] = 'c'
- info['libraries'] = [lib]
+ info['libraries'] = lib
info['define_macros'] = [('HAVE_CBLAS', None)]
self.set_info(**info)
@@ -1772,16 +1748,16 @@ class blas_info(system_info):
# check for cblas lib, and if not present check for blas lib.
try:
c.link_executable(obj, os.path.join(tmpdir, "a.out"),
- libraries=["cblas"],
+ libraries=info["libraries"],
library_dirs=info['library_dirs'],
extra_postargs=info.get('extra_link_args', []))
- res = "cblas"
+ res = info["libraries"]
except distutils.ccompiler.LinkError:
c.link_executable(obj, os.path.join(tmpdir, "a.out"),
libraries=["blas"],
library_dirs=info['library_dirs'],
extra_postargs=info.get('extra_link_args', []))
- res = "blas"
+ res = ["blas"]
except distutils.ccompiler.CompileError:
res = None
finally:
From dce7f20e95e6bd3fc07517c0b2daf3942a34ddf7 Mon Sep 17 00:00:00 2001
From: Charles Harris <charlesr.harris@gmail.com>
Date: Wed, 14 Mar 2018 12:52:26 -0600
Subject: [PATCH] MAINT: Fix test_utils.py for Python 3.7.
The contents of the module warnings registries was made more module
specific in Python 3.7 and consequently the tests of the context
managers clear_and_catch_warnings and suppress_warnings need updating.
---
numpy/testing/tests/test_utils.py | 43 +++++++++++++++++++++----------
1 file changed, 29 insertions(+), 14 deletions(-)
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py
index a97b627f9..33b3555b0 100644
--- a/numpy/testing/tests/test_utils.py
+++ b/numpy/testing/tests/test_utils.py
@@ -1114,18 +1114,28 @@ class TestStringEqual(unittest.TestCase):
lambda: assert_string_equal("foo", "hello"))
-def assert_warn_len_equal(mod, n_in_context, py3_n_in_context=None):
+def assert_warn_len_equal(mod, n_in_context, py34=None, py37=None):
mod_warns = mod.__warningregistry__
+ num_warns = len(mod_warns)
# Python 3.4 appears to clear any pre-existing warnings of the same type,
# when raising warnings inside a catch_warnings block. So, there is a
# warning generated by the tests within the context manager, but no
# previous warnings.
if 'version' in mod_warns:
- if py3_n_in_context is None:
- py3_n_in_context = n_in_context
- assert_equal(len(mod_warns) - 1, py3_n_in_context)
- else:
- assert_equal(len(mod_warns), n_in_context)
+ # Python 3 adds a 'version' entry to the registry,
+ # do not count it.
+ num_warns -= 1
+
+ # Behavior of warnings is Python version dependent. Adjust the
+ # expected result to compensate. In particular, Python 3.7 does
+ # not make an entry for ignored warnings.
+ if sys.version_info[:2] >= (3, 7):
+ if py37 is not None:
+ n_in_context = py37
+ elif sys.version_info[:2] >= (3, 4):
+ if py34 is not None:
+ n_in_context = py34
+ assert_equal(num_warns, n_in_context)
def _get_fresh_mod():
@@ -1134,6 +1144,8 @@ def _get_fresh_mod():
try:
my_mod.__warningregistry__.clear()
except AttributeError:
+ # will not have a __warningregistry__ unless warning has been
+ # raised in the module at some point
pass
return my_mod
@@ -1147,21 +1159,23 @@ def test_clear_and_catch_warnings():
warnings.warn('Some warning')
assert_equal(my_mod.__warningregistry__, {})
# Without specified modules, don't clear warnings during context
+ # Python 3.7 catch_warnings doesn't make an entry for 'ignore'.
with clear_and_catch_warnings():
warnings.simplefilter('ignore')
warnings.warn('Some warning')
- assert_warn_len_equal(my_mod, 1)
+ assert_warn_len_equal(my_mod, 1, py37=0)
# Confirm that specifying module keeps old warning, does not add new
with clear_and_catch_warnings(modules=[my_mod]):
warnings.simplefilter('ignore')
warnings.warn('Another warning')
- assert_warn_len_equal(my_mod, 1)
+ assert_warn_len_equal(my_mod, 1, py37=0)
# Another warning, no module spec does add to warnings dict, except on
# Python 3.4 (see comments in `assert_warn_len_equal`)
+ # Python 3.7 catch_warnings doesn't make an entry for 'ignore'.
with clear_and_catch_warnings():
warnings.simplefilter('ignore')
warnings.warn('Another warning')
- assert_warn_len_equal(my_mod, 2, 1)
+ assert_warn_len_equal(my_mod, 2, py34=1, py37=0)
def test_suppress_warnings_module():
@@ -1178,6 +1192,7 @@ def test_suppress_warnings_module():
np.apply_along_axis(warn, 0, [0])
# Test module based warning suppression:
+ assert_warn_len_equal(my_mod, 0)
with suppress_warnings() as sup:
sup.record(UserWarning)
# suppress warning from other module (may have .pyc ending),
@@ -1189,8 +1204,7 @@ def test_suppress_warnings_module():
# got filtered)
assert_(len(sup.log) == 1)
assert_(sup.log[0].message.args[0] == "Some warning")
-
- assert_warn_len_equal(my_mod, 0)
+ assert_warn_len_equal(my_mod, 0, py37=0)
sup = suppress_warnings()
# Will have to be changed if apply_along_axis is moved:
sup.filter(module=my_mod)
@@ -1204,11 +1218,11 @@ def test_suppress_warnings_module():
assert_warn_len_equal(my_mod, 0)
# Without specified modules, don't clear warnings during context
+ # Python 3.7 does not add ignored warnings.
with suppress_warnings():
warnings.simplefilter('ignore')
warnings.warn('Some warning')
- assert_warn_len_equal(my_mod, 1)
-
+ assert_warn_len_equal(my_mod, 1, py37=0)
def test_suppress_warnings_type():
# Initial state of module, no warnings
@@ -1232,10 +1246,11 @@ def test_suppress_warnings_type():
assert_warn_len_equal(my_mod, 0)
# Without specified modules, don't clear warnings during context
+ # Python 3.7 does not add ignored warnings.
with suppress_warnings():
warnings.simplefilter('ignore')
warnings.warn('Some warning')
- assert_warn_len_equal(my_mod, 1)
+ assert_warn_len_equal(my_mod, 1, py37=0)
def test_suppress_warnings_decorate_no_record():
--
2.18.0
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
PYTHON_REQ_USE="threads(+)"
FORTRAN_NEEDED=lapack
inherit distutils-r1 flag-o-matic fortran-2 multiprocessing toolchain-funcs
DOC_PV="${PV}"
DOC_P="${PN}-${DOC_PV}"
DESCRIPTION="Fast array and numerical python library"
HOMEPAGE="https://www.numpy.org"
SRC_URI="
mirror://pypi/${PN:0:1}/${PN}/${P}.zip
doc? (
http://docs.scipy.org/doc/${DOC_P}/${PN}-html-${DOC_PV}.zip
http://docs.scipy.org/doc/${DOC_P}/${PN}-ref-${DOC_PV}.pdf
http://docs.scipy.org/doc/${DOC_P}/${PN}-user-${DOC_PV}.pdf
)"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="doc lapack test"
RDEPEND="lapack? ( virtual/cblas virtual/lapack )"
DEPEND="${RDEPEND}
app-arch/unzip
dev-python/setuptools[${PYTHON_USEDEP}]
lapack? ( virtual/pkgconfig )
test? ( >=dev-python/nose-1.0[${PYTHON_USEDEP}] )"
PATCHES=(
"${FILESDIR}"/${PN}-1.14.5-no-hardcode-blas.patch
# backport a fix for py3.7 test failures
"${FILESDIR}"/numpy-1.14.5-py37.patch
)
src_unpack() {
default
if use doc; then
unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
fi
}
pc_incdir() {
$(tc-getPKG_CONFIG) --cflags-only-I $@ | \
sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
}
pc_libdir() {
$(tc-getPKG_CONFIG) --libs-only-L $@ | \
sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||'
}
pc_libs() {
$(tc-getPKG_CONFIG) --libs-only-l $@ | \
sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
-e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
| tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||'
}
python_prepare_all() {
if use lapack; then
append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)"
local libdir="${EPREFIX}"/usr/$(get_libdir)
cat >> site.cfg <<-EOF || die
[blas]
include_dirs = $(pc_incdir cblas)
library_dirs = $(pc_libdir cblas blas):${libdir}
blas_libs = $(pc_libs cblas blas),m
[lapack]
library_dirs = $(pc_libdir lapack):${libdir}
lapack_libs = $(pc_libs lapack),m
EOF
else
export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
fi
export CC="$(tc-getCC) ${CFLAGS}"
append-flags -fno-strict-aliasing
# See progress in http://projects.scipy.org/scipy/numpy/ticket/573
# with the subtle difference that we don't want to break Darwin where
# -shared is not a valid linker argument
if [[ ${CHOST} != *-darwin* ]]; then
append-ldflags -shared
fi
# only one fortran to link with:
# linking with cblas and lapack library will force
# autodetecting and linking to all available fortran compilers
append-fflags -fPIC
if use lapack; then
NUMPY_FCONFIG="config_fc --noopt --noarch"
# workaround bug 335908
[[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
fi
# don't version f2py, we will handle it.
sed -i -e '/f2py_exe/s: + os\.path.*$::' numpy/f2py/setup.py || die
# we don't have f2py-3.3
sed \
-e 's:test_f2py:_&:g' \
-i numpy/tests/test_scripts.py || die
distutils-r1_python_prepare_all
}
python_compile() {
export MAKEOPTS=-j1 # bug #660754
local python_makeopts_jobs=""
python_is_python3 || python_makeopts_jobs="-j $(makeopts_jobs)"
distutils-r1_python_compile \
${python_makeopts_jobs} \
${NUMPY_FCONFIG}
}
python_test() {
distutils_install_for_testing --single-version-externally-managed --record "${TMPDIR}/record.txt" ${NUMPY_FCONFIG}
cd "${TMPDIR}" || die
${EPYTHON} -c "
import numpy, sys
r = numpy.test(label='full', verbose=3)
sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}"
}
python_install() {
distutils-r1_python_install ${NUMPY_FCONFIG}
}
python_install_all() {
local DOCS=( THANKS.txt )
if use doc; then
local HTML_DOCS=( "${WORKDIR}"/html/. )
DOCS+=( "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf )
fi
distutils-r1_python_install_all
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment