release homeassistant-0.81.1
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
AUX numpy-1.15.2-no-hardcode-blas.patch 3767 BLAKE2B f580a067b9c91a53f99daffd33f38306abb3d2852f4d513152531fb0796f50371c9031b7c685fd35801afbe2a5b649efd4d2cdca9c239f119893b1fde19bda3b SHA512 66a7d9988ab3e6f5b1788df7db9d81719c43ba641edc3450a4912c46aaf0ffb3ba6030dc458182adfb11eafac91f2ba6e1c5aa9b8eb077d6d8c776b2ec5ad2fc
|
||||
AUX numpy-1.15.2-py37.patch 5417 BLAKE2B a6660b06a6f5ebc436b8bef4f53934892384889304f3b48ed1e9e84298deb78528e431e2102856fe1bc44b5e9a472b3a0b51401ad824b7072465d8c54f6aa939 SHA512 78b6a1640cf51e9b58478fd9ad5044bec2efc1319cc050f0a1345fc367b57b9170954ce25b88b2851007b438a00ac380eab48f6b699fed1115d109972ec553ad
|
||||
DIST numpy-1.15.2.zip 4484511 BLAKE2B 35eead87706f2f3ab1f9e82a2f6816ef8c5015c611aff838a18dcd9fda49f1a20840a0f2a5c6cfc144118545f00a66c0b599c38600a63a454d1d95cdd4286d5f SHA512 6a2c9c5e67963558749e6468d79c7dc55f13749400640dbb7dea8c87a30c9cadb04df6b3cf3f92ac7d720486ef3f3c248ab4680b954e7adeb44edf2f2a072250
|
||||
EBUILD numpy-1.15.2.ebuild 3873 BLAKE2B 7f3555198abfa45dd15e8ab3fd7ca3b4090fa71f01be768dce67cd4053b7b67553f3bc28d25c91c0acf0877052d0d34691a125e9dc6d92898dea41962da0aa63 SHA512 8324627958e0bce76e59f6bd8f6c092435153818ed92da0c3ad1c9c8cb34e8c86d4f2fd8f611d6c5c4c806823f45d48273153a56de9d7110b0cdbd7fd4dee323
|
||||
@@ -0,0 +1,75 @@
|
||||
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:
|
||||
@@ -0,0 +1,135 @@
|
||||
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
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# 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"
|
||||
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)
|
||||
[lapack]
|
||||
library_dirs = $(pc_libdir lapack):${libdir}
|
||||
lapack_libs = $(pc_libs lapack)
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user