diff --git a/app-misc/homeassistant/homeassistant-0.81.1.ebuild b/app-misc/homeassistant/homeassistant-0.81.1.ebuild new file mode 100644 index 000000000..20ead5358 --- /dev/null +++ b/app-misc/homeassistant/homeassistant-0.81.1.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2018 Gentoo Foundation +# Ebuild (C)2018 OnkelBeh +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python3_5 python3_6 ) + +inherit user readme.gentoo-r1 eutils distutils-r1 + +DESCRIPTION="Open-source home automation platform running on Python 3.6" +HOMEPAGE="https://home-assistant.io" +SRC_URI="https://github.com/home-assistant/home-assistant/archive/${PV}.tar.gz -> ${P}.tar.gz" +RESTRICT="mirror" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64" +IUSE="atv hs100 maint tradfri wemo mysql musiccast" + +DEPEND=" + ${PYTHON_DEPS} + !app-misc/homeassistant-bin + >=dev-python/aiohttp-3.4.4[${PYTHON_USEDEP}] + >=dev-python/aiohttp-cors-0.7.0[${PYTHON_USEDEP}] + >=dev-python/astral-1.6.1[${PYTHON_USEDEP}] + >=dev-python/async_timeout-3.0.0[${PYTHON_USEDEP}] + >=dev-python/attrs-18.2.0[${PYTHON_USEDEP}] + >=dev-python/attrs-18.2.0[${PYTHON_USEDEP}] + >=dev-python/bcrypt-3.1.4[${PYTHON_USEDEP}] + >=dev-python/beautifulsoup-4.5.1[${PYTHON_USEDEP}] + >=dev-python/certifi-2018.4.16[${PYTHON_USEDEP}] + >=dev-python/chardet-3.0.4[${PYTHON_USEDEP}] + >=dev-python/colorlog-3.1.4[${PYTHON_USEDEP}] + >=dev-python/cryptography-2.3.1[${PYTHON_USEDEP}] + >=dev-python/idna-ssl-1.0.1[${PYTHON_USEDEP}] + >=dev-python/jinja-2.10[${PYTHON_USEDEP}] + >=dev-python/paho-mqtt-1.4.0[${PYTHON_USEDEP}] + >=dev-python/pip-9.0.1[${PYTHON_USEDEP}] + >=dev-python/pytz-2018.04[${PYTHON_USEDEP}] + >=dev-python/pyyaml-3.13[${PYTHON_USEDEP}] + >=dev-python/requests-2.19.1-r1[${PYTHON_USEDEP}] + >=dev-python/typing-3.6.2-r1[${PYTHON_USEDEP}] + >=dev-python/urllib3-1.22[${PYTHON_USEDEP}] + >=dev-python/voluptuous-0.11.5[${PYTHON_USEDEP}] + >=dev-python/voluptuous-serialize-2.0.0[${PYTHON_USEDEP}] + >=dev-python/websocket-client-0.40.0[${PYTHON_USEDEP}] + >=dev-python/yarl-1.1.1[${PYTHON_USEDEP}] + atv? ( >=dev-python/pyatv-0.3.9[${PYTHON_USEDEP}] ) + musiccast? ( >=dev-python/pymusiccast-0.1.6[${PYTHON_USEDEP}] ) + mysql? ( dev-python/mysqlclient[${PYTHON_USEDEP}] ) + hs100? ( >=dev-python/pyhs100-0.3.0[${PYTHON_USEDEP}] ) + tradfri? ( >=dev-python/pytradfri-4.1.0[${PYTHON_USEDEP}] + sys-devel/autoconf ) + wemo? ( >=dev-python/pywemo-0.4.25[${PYTHON_USEDEP}] ) + dev-db/sqlite + dev-libs/libfastjson + dev-libs/openssl +" + +RDEPEND=" + ${DEPEND} + app-admin/logrotate + maint? ( + app-crypt/certbot + app-crypt/ssl-cert-check + net-misc/dropbox-uploader + ) +" + +INSTALL_DIR="/opt/${PN}" + +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS=" + The HA interface listens on port 8123 - this _will_ take a minute or two to appear + + hass configuration is in: /etc/${MY_PN} + daemon command line arguments are configured in: /etc/conf.d/${MY_PN} + + logging is to: /var/log/${MY_PN}/{server,errors,stdout}.log + + The sqlite db is by default in: /etc/${MY_PN} + To move it after ${MY_PN} has run once and while ${MY_PN} is stopped: + - add /etc/${MY_PN}/recorder.yaml to /etc/${MY_PN}/configuration.yaml + - mv /etc/${MY_PN}/home-assistant_v2.db /var/db/${MY_PN} + + support thread at: + https://community.home-assistant.io/t/gentoo-homeassistant-0-59-2-ebuild/35577 +" + +S="${WORKDIR}/home-assistant-${PV}" + +DOCS="README.rst" + +pkg_setup() { + enewgroup "${PN}" + enewuser "${PN}" -1 -1 "$INSTALL_DIR" "${PN}" +} + +src_prepare() { + sed -e 's;astral==1.5;astral>=1.5;' \ + -i "setup.py" \ + -i homeassistant/package_constraints.txt + + eapply_user +} + +python_install_all() { + dodoc ${DOCS} + distutils-r1_python_install_all + + keepdir "$INSTALL_DIR" + + keepdir "/etc/${PN}" + fowners -R "${PN}:${PN}" "/etc/${PN}" + + newconfd "${FILESDIR}/${PN}.conf.d" "${PN}" + newinitd "${FILESDIR}/${PN}.init.d" "${PN}" + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/dev-python/async_timeout/Manifest b/dev-python/async_timeout/Manifest new file mode 100644 index 000000000..6cf98fbb5 --- /dev/null +++ b/dev-python/async_timeout/Manifest @@ -0,0 +1,2 @@ +DIST async-timeout-3.0.1.tar.gz 9724 BLAKE2B f18ae75969b7048469fe22949f25ea25da3fdbf08b98a16b5d5ffe823060a75e6de9ed764727e08d4344c79426e9c89013d49522f20ed62e6fbe912b5c7a8787 SHA512 fd30842671a79edfd52c7350e7fb2120533a6d97b44975f7b071ce2cbde43443bd5bbe1f2ad0ad3ab2156e1987b9e58e0c149b0ecfea8674eb0cb78eee79c986 +EBUILD async_timeout-3.0.1.ebuild 867 BLAKE2B 9ad680d40395f27145577fbea4a79743a14b003c433d954ba7e9735c30da409e2fc44240d1caab866389645e50d9cd93d05a600ec31b7127907022a26dea5758 SHA512 f8f416154f2d0d53d37fe97ff708bce26120634a79424c4921eab7ee830c3c7867617e52f5fa30bfba89d3407b7f7276b0fe32bbe05738707d1aec6505b58073 diff --git a/dev-python/async_timeout/async_timeout-3.0.1.ebuild b/dev-python/async_timeout/async_timeout-3.0.1.ebuild new file mode 100644 index 000000000..67af0e9ad --- /dev/null +++ b/dev-python/async_timeout/async_timeout-3.0.1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python3_{5,6} ) + +inherit distutils-r1 + +MY_P=${PN/_/-}-${PV} +DESCRIPTION="Timeout context manager for asyncio programs" +HOMEPAGE="https://github.com/aio-libs/async-timeout" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ~x86" +IUSE="test" +S=${WORKDIR}/${MY_P} + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/setuptools_scm[${PYTHON_USEDEP}] + test? ( dev-python/pytest-aiohttp[${PYTHON_USEDEP}] )" + +python_prepare_all() { + sed -i "s:, 'pytest-runner'::" -i setup.py || die + # tests fail due to missing fixture when trying to load this file + rm tests/conftest.py || die + distutils-r1_python_prepare_all +} + +python_test() { + py.test -v || die "Tests fail with ${EPYTHON}" +} diff --git a/dev-python/boto3/Manifest b/dev-python/boto3/Manifest new file mode 100644 index 000000000..a123e811d --- /dev/null +++ b/dev-python/boto3/Manifest @@ -0,0 +1,2 @@ +DIST boto3-1.9.16.tar.gz 238241 BLAKE2B dc191895e8130b01981a0452cad6b588f7ad068469bf9ea12913a98bd94a5d0636fc4faa47940b5ea8d86e61000e56fa1323e577fd3d9ea5e02c4a9333f35dfc SHA512 f36d35c030f2cc4108b2369905c868d364459bf7d3eef6ce7943187b02c1c7c48a8556e314e4e17f1652a4e61775e38eb060d888c4e3e13164bc0bbcf5430181 +EBUILD boto3-1.9.16.ebuild 1228 BLAKE2B de6d5b56edbe0b4c9a8fe6cf28ac04a01c62ac4a60e1182daf7d5a4b3a5d9251952e85ef45d62a4953845219d38253ddb22aa303bb6e26ecaf0af3c258d11705 SHA512 13addc19481acfaf316e1d0f45e92a6077b3c1065e45c6e35889d91995f1b195dc45dc8cc966bdf983968a12994254395b885ac8163aebdbc10c87da41e16d25 diff --git a/dev-python/boto3/boto3-1.9.16.ebuild b/dev-python/boto3/boto3-1.9.16.ebuild new file mode 100644 index 000000000..d62092d13 --- /dev/null +++ b/dev-python/boto3/boto3-1.9.16.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 ) + +inherit distutils-r1 vcs-snapshot + +DESCRIPTION="The AWS SDK for Python" +HOMEPAGE="https://github.com/boto/boto3" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="doc test" + +if [[ "${PV}" == "9999" ]]; then + EGIT_REPO_URI="https://github.com/boto/boto3" + inherit git-r3 +else + SRC_URI="https://github.com/boto/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux" +fi + +RDEPEND=" + >=dev-python/botocore-1.12.4[${PYTHON_USEDEP}] + dev-python/jmespath[${PYTHON_USEDEP}] + dev-python/s3transfer[${PYTHON_USEDEP}] +" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( + dev-python/guzzle_sphinx_theme[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ) + test? ( + ${RDEPEND} + dev-python/mock[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + ) +" + +python_compile_all() { + use doc && emake -C docs html +} + +python_test() { + nosetests -v tests/unit/ tests/functional/ || die "test failed under ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/build/html/. ) + + distutils-r1_python_install_all +} diff --git a/dev-python/construct/construct-2.9.45.ebuild b/dev-python/construct/construct-2.9.45.ebuild new file mode 100644 index 000000000..d69349b60 --- /dev/null +++ b/dev-python/construct/construct-2.9.45.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit distutils-r1 + +DESCRIPTION="A powerful declarative parser for binary data" +HOMEPAGE="http://construct.readthedocs.io/ https://pypi.org/project/construct/" +SRC_URI="https://github.com/construct/construct/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 ~x86" +IUSE="test" +RESTRICT="test" + +DEPEND="test? ( + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/scimath[${PYTHON_USEDEP}]' 'python2_7') + )" + +python_test() { + pytest -vv || die "Tests failed under ${EPYTHON}" +} + +pkg_postinst() { + ewarn "Version 2.9.x has significant API and implementation changes from" + ewarn "previous 2.8.x releases. Please read the documentation at" + ewarn "https://construct.readthedocs.io/en/latest/transition29.html" + ewarn "for more info." +} diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest new file mode 100644 index 000000000..578b3e418 --- /dev/null +++ b/dev-python/numpy/Manifest @@ -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 diff --git a/dev-python/numpy/files/numpy-1.15.2-no-hardcode-blas.patch b/dev-python/numpy/files/numpy-1.15.2-no-hardcode-blas.patch new file mode 100644 index 000000000..39777ec55 --- /dev/null +++ b/dev-python/numpy/files/numpy-1.15.2-no-hardcode-blas.patch @@ -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: diff --git a/dev-python/numpy/files/numpy-1.15.2-py37.patch b/dev-python/numpy/files/numpy-1.15.2-py37.patch new file mode 100644 index 000000000..c53b3acf6 --- /dev/null +++ b/dev-python/numpy/files/numpy-1.15.2-py37.patch @@ -0,0 +1,135 @@ +From dce7f20e95e6bd3fc07517c0b2daf3942a34ddf7 Mon Sep 17 00:00:00 2001 +From: Charles Harris +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 + diff --git a/dev-python/numpy/numpy-1.15.2.ebuild b/dev-python/numpy/numpy-1.15.2.ebuild new file mode 100644 index 000000000..e0fc3a19c --- /dev/null +++ b/dev-python/numpy/numpy-1.15.2.ebuild @@ -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 +} diff --git a/dev-python/twilio/Manifest b/dev-python/twilio/Manifest new file mode 100644 index 000000000..580f9586d --- /dev/null +++ b/dev-python/twilio/Manifest @@ -0,0 +1,2 @@ +DIST twilio-6.19.1.tar.gz 482956 BLAKE2B 361b8a03253ad6e4ff0399264ecef16b8f7d975ea40c4e4867a3a13d15fbf6a4f3c9f445b6795b72c8825e122ef4cbd7c068a4bd3157b42a3d71b0051995cf6f SHA512 2460ddba0af11da10f9efbb985aa9a0d05fe12053145b29d4b7ba2b330f7b95629acb10b73b1e4e736853955dcd21f82c44ffb08e75cfad35818518c777c3c38 +EBUILD twilio-6.19.1.ebuild 769 BLAKE2B 4ce6d7e593f197b3677ba13d15493eee4667f359465aa534da154af2b05d65735233f7d287eb7b29fdaa892ae81ec439cc61f7b04c931d9d5783788021b84326 SHA512 9c21e40390f4243e6be0ad51a0ef71712cae98690e41f59250630173eb82958ce9f424b0ec5b380fe1cbecf821305e6a9cd5f1c73dc1284f6e29462d30f1f286 diff --git a/dev-python/twilio/twilio-6.19.1.ebuild b/dev-python/twilio/twilio-6.19.1.ebuild new file mode 100644 index 000000000..d6ce9dbff --- /dev/null +++ b/dev-python/twilio/twilio-6.19.1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit distutils-r1 vcs-snapshot + +DESCRIPTION="Helper library for the Twilio API" +HOMEPAGE="https://github.com/twilio/twilio-python http://www.twilio.com/docs/python/install" +SRC_URI="https://github.com/twilio/${PN}-python/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="test" + +CDEPEND="dev-python/six[${PYTHON_USEDEP}] + dev-python/httplib2[${PYTHON_USEDEP}] + dev-python/PySocks[${PYTHON_USEDEP}]" + +RDEPEND="${CDEPEND}" +DEPEND="test? ( + ${CDEPEND} + dev-python/nose[${PYTHON_USEDEP}] + )" + +python_test() { + nosetests tests || die "Tests fail with ${EPYTHON}" +}