diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-08-25 07:36:27 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-08-25 07:36:27 +0100 |
commit | 43793fab84041cfc5c60c0151d1591b8a69fb24a (patch) | |
tree | 6208a7f4fc744684fce0f55acbb47511acace498 /dev-python/click | |
parent | 28e3d252dc8ac8a5635206dfefe1cfe05058d1db (diff) |
gentoo resync : 25.08.2018
Diffstat (limited to 'dev-python/click')
-rw-r--r-- | dev-python/click/Manifest | 5 | ||||
-rw-r--r-- | dev-python/click/click-6.7-r1.ebuild | 55 | ||||
-rw-r--r-- | dev-python/click/click-6.7.ebuild | 5 | ||||
-rw-r--r-- | dev-python/click/files/click-6.7-fix-tests.patch | 65 | ||||
-rw-r--r-- | dev-python/click/files/click-6.7-support-sphinx-1.7.patch | 44 |
5 files changed, 173 insertions, 1 deletions
diff --git a/dev-python/click/Manifest b/dev-python/click/Manifest index 3122961625ec..af56c2eb945c 100644 --- a/dev-python/click/Manifest +++ b/dev-python/click/Manifest @@ -1,7 +1,10 @@ +AUX click-6.7-fix-tests.patch 1971 BLAKE2B 67c0b66f8668851eb48899aab98b4437846f65cec5389957645f5dd637b6e2a0fc2934856815a85b958c8326a8c33bb1c97bdf963d1774173051eb3ea05c7096 SHA512 fb864761ae8bea93096b9d090eef9cecef7707751d58fa40f846aeccaa8f59e8e01af38f8f79624b94c6ad081b9a388bef287b33b7659bdbbc292f1ae87abda6 +AUX click-6.7-support-sphinx-1.7.patch 1243 BLAKE2B d4939d49d43b50a3cddb77899ed2aae9ef6ede0941ca1e7e2d8d23d4f5afa0875df7d126adb498639839efb18790d021549018a355da3d4d71a77d4a6e80db79 SHA512 e497364ebf6243feb7281609d82ac73a73f1e399c1fcaf8a6c97a870c738d21605bcc98397adec7b4b0e1ebba209adf6eb1c6708c157e81e4baef1af1375e15d DIST click-5.1.tar.gz 275592 BLAKE2B 0a58e210003f88081fd2ba8e9f401c74d8d61758ae096fde9fa4aebe8a819623aeb90106bf141d5193d632d70488629cf63833297dc1e4b200824cee205c3c4b SHA512 b860b0227644f5d1cc24d41e66985421ec971f11f3f596fb46508fdc787200b949e7ef29b2035421ebb0115384688da03c3c95a0d6acc58dd3b566b32a2b7c6a DIST click-6.6.tar.gz 283420 BLAKE2B 1fdc90ca65d18153d6260b6753e14a1d94cae77ab7f52dcda4fb439f9fdfeea8fdc33b1ce60e93711ba40ecdc508dc3fc5f8aadc371bd85b7dca1bfa070786c2 SHA512 5650cfe6c8b55a7e823e22248964143278d61383dac63497508a864807f1950f9dd5d76ce6a501e589dd81fed6e2a1248d3f8973be25a91950896b7408dc88bc DIST click-6.7.tar.gz 279019 BLAKE2B cc1e59d0a34ccb4ce50c8a2982b308d23cd525ceb44d84a493c0fe9b5a6f7f616e8a4c440ae211fca811a2bf904ddb75d93618f3c6ac7bbe6b1ed022710dab1f SHA512 d454369fe1acb01c2210a61e15f45ac9cc77102c93345257f4ef3090bd8f31f1ccc49d9fd6ea670cddca9f715ad5db29368b4eecd95abff50d1033c4f7a967d6 EBUILD click-5.1.ebuild 1205 BLAKE2B bd6d5fb8ca349249840a8db62756295ce6d79d214d90e6f655b9edf5d5ccf86e53399508d01725270bfb5960156f0381fe046c5bf7929e0c91d0ad7b9010a0eb SHA512 dbc45857683e0cb698b9b95f743a13f0d7f77df33eb9d58397404040dac04fb8b0e811afae51ce886a4ace5c6136c3ac1d4ab3dfc53208a5bcd2f74ca5dce464 EBUILD click-6.6.ebuild 1192 BLAKE2B 6506d88b1792f1a1f5107537a8ed73c34bb4b8dd87b27036df1fa6945f0359ec3482d4a7f33f2c78f3bc438bd534d4483079d1eacdc274f9f64bcde43ac8e91e SHA512 9523bcfd4ac931ab76891ed4a7409bc1f9df8a78a5f180aa26e47fdbcf23989f5854534c0440ae1aabfa07f0186236001f3a5c40e997d8582283990369d75272 -EBUILD click-6.7.ebuild 1195 BLAKE2B a50590e42062884ea75e3ae363372e56f337bb00a58c0b509893b38b80ab0c2b48fabc5bb5faef45cf3cb9dbebf389f0f4006075f0d08e86afc2bc33010eac52 SHA512 012ebc4160721e23ec4da71fd74d27e10ad99c80f0460b3c440454d165107823414d737add338418818bf79af50c9cd9a1a8842ffd1391582deb1ced721be030 +EBUILD click-6.7-r1.ebuild 1409 BLAKE2B cbdf14b5d50a70ee328521c427c82d1c8a42cd1d04fe886f2abf5324afd148c7731c867e37fc400115c39d5f66a8b26bf0e0944d043b073d3c85802d73cf6cb0 SHA512 a3466b60faf7254cf997e42a9d2238732f25f67971c1bd3049fb403e9fcb1e2680b896e4ac094cbc27ef37a7fe32b39628c3431efa3c37b92b05ce531e86dee2 +EBUILD click-6.7.ebuild 1299 BLAKE2B b06ef47d14e3fa73a2392febdfce4b1de139a7c26262122bea89e402e0a4c8a8c861a6190ca852e4b721bc97b772a760a5583c91f4625c2bc40ec7ed1989d429 SHA512 347af3d728b0ae9c766880daf863eb2da95d6c94aa71cb93fc3402aa4e77105cee2841d8f1d5c769379c22dc351238f827c36c3728125515a4194adae474bf0f MISC metadata.xml 308 BLAKE2B 813de6efdb1f5f1c8f59f403d8d7d46a4f75bd7b135a46714aba69ac841e12d650ac0c0bc53af62e3c240998fcbdc11a12cde34397af99e7483b29a7b701f1a7 SHA512 6dd2c4334b6ad8b0942f5cbd443e7bd5cefdcadf2541d341f46fa153a28a6ab5f074270638796efe6a7df48a20be9abcb3f41bfa19c58b1e30ed13fe56b1d6d1 diff --git a/dev-python/click/click-6.7-r1.ebuild b/dev-python/click/click-6.7-r1.ebuild new file mode 100644 index 000000000000..9a963c756129 --- /dev/null +++ b/dev-python/click/click-6.7-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="A Python package for creating beautiful command line interfaces" +SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" +HOMEPAGE="http://click.pocoo.org/ https://pypi.org/project/click/" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="doc examples test" + +REQUIRED_USE="doc? ( || ( $(python_gen_useflags 'python2*') ) )" + +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/pytest[${PYTHON_USEDEP}] ) + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )" + +PATCHES=( + # From upstream, can be removed in next release. + "${FILESDIR}/${PN}-6.7-fix-tests.patch" + # From upstream, can be removed in next release. + "${FILESDIR}/${PN}-6.7-support-sphinx-1.7.patch" +) + +pkg_setup() { + use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python2*' ) +} + +python_prepare_all() { + # Prevent un-needed d'loading + sed -e "s/, 'sphinx.ext.intersphinx'//" -i docs/conf.py || die + distutils-r1_python_prepare_all +} + +python_compile_all() { + use doc && emake -C docs html +} + +python_test() { + emake test +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/_build/html/. ) + use examples && dodoc -r examples + distutils-r1_python_install_all +} diff --git a/dev-python/click/click-6.7.ebuild b/dev-python/click/click-6.7.ebuild index a594f6dc8176..74c2f3587ec8 100644 --- a/dev-python/click/click-6.7.ebuild +++ b/dev-python/click/click-6.7.ebuild @@ -23,6 +23,11 @@ DEPEND=" test? ( dev-python/pytest[${PYTHON_USEDEP}] ) doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )" +PATCHES=( + # From upstream, can be removed in next release. + "${FILESDIR}/${PN}-6.7-fix-tests.patch" +) + pkg_setup() { use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python2*' ) } diff --git a/dev-python/click/files/click-6.7-fix-tests.patch b/dev-python/click/files/click-6.7-fix-tests.patch new file mode 100644 index 000000000000..8a305e3665dd --- /dev/null +++ b/dev-python/click/files/click-6.7-fix-tests.patch @@ -0,0 +1,65 @@ +From 20b4b1c0d1564ab4ef44b7d27d5b650735e28be3 Mon Sep 17 00:00:00 2001 +From: Armin Ronacher <armin.ronacher@active-4.com> +Date: Sat, 23 Dec 2017 09:27:57 +0100 +Subject: [PATCH] Updated tests to work with newer pytest versions + +--- + tests/test_basic.py | 2 +- + tests/test_compat.py | 9 +++++---- + tests/test_options.py | 2 +- + 3 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/tests/test_basic.py b/tests/test_basic.py +index 045f608..960cd32 100644 +--- a/tests/test_basic.py ++++ b/tests/test_basic.py +@@ -357,7 +357,7 @@ def test_required_option(runner): + def test_evaluation_order(runner): + called = [] + +- def memo(ctx, value): ++ def memo(ctx, param, value): + called.append(value) + return value + +diff --git a/tests/test_compat.py b/tests/test_compat.py +index e4ecdc8..9dacc21 100644 +--- a/tests/test_compat.py ++++ b/tests/test_compat.py +@@ -1,4 +1,5 @@ + import click ++import pytest + + + if click.__version__ >= '3.0': +@@ -11,10 +12,10 @@ if click.__version__ >= '3.0': + def cli(foo): + click.echo(foo) + +- result = runner.invoke(cli, ['--foo', 'wat']) +- assert result.exit_code == 0 +- assert 'WAT' in result.output +- assert 'Invoked legacy parameter callback' in result.output ++ with pytest.warns(Warning, match='Invoked legacy parameter callback'): ++ result = runner.invoke(cli, ['--foo', 'wat']) ++ assert result.exit_code == 0 ++ assert 'WAT' in result.output + + + def test_bash_func_name(): +diff --git a/tests/test_options.py b/tests/test_options.py +index 9dd8cdf..8bdda1f 100644 +--- a/tests/test_options.py ++++ b/tests/test_options.py +@@ -199,7 +199,7 @@ def test_nargs_envvar(runner): + + + def test_custom_validation(runner): +- def validate_pos_int(ctx, value): ++ def validate_pos_int(ctx, param, value): + if value < 0: + raise click.BadParameter('Value needs to be positive') + return value +-- +2.16.4 + diff --git a/dev-python/click/files/click-6.7-support-sphinx-1.7.patch b/dev-python/click/files/click-6.7-support-sphinx-1.7.patch new file mode 100644 index 000000000000..1076c2decad1 --- /dev/null +++ b/dev-python/click/files/click-6.7-support-sphinx-1.7.patch @@ -0,0 +1,44 @@ +From 2c7929511114494350e26d7b0c790fb8ca82f605 Mon Sep 17 00:00:00 2001 +From: Daw-Ran Liou <dawran6@gmail.com> +Date: Mon, 14 May 2018 13:34:23 -0400 +Subject: [PATCH] Support Sphinx 1.7+ + +Move: from sphinx.util.compat import Directive +To: from docutils.parsers.rst import Directive +--- + docs/clickdoctools.py | 2 +- + setup.py | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/docs/clickdoctools.py b/docs/clickdoctools.py +index c3db195..1dd47d3 100644 +--- a/docs/clickdoctools.py ++++ b/docs/clickdoctools.py +@@ -15,7 +15,7 @@ from docutils import nodes + from docutils.statemachine import ViewList + + from sphinx.domains import Domain +-from sphinx.util.compat import Directive ++from docutils.parsers.rst import Directive + + PY2 = sys.version_info[0] == 2 + +diff --git a/setup.py b/setup.py +index b78403e..f1bcdcf 100644 +--- a/setup.py ++++ b/setup.py +@@ -24,6 +24,11 @@ setup( + maintainer_email='contact@palletsprojects.com', + long_description=readme, + packages=['click'], ++ extras_require={ ++ 'docs': [ ++ 'sphinx', ++ ], ++ }, + description='A simple wrapper around optparse for ' + 'powerful command line utilities.', + license='BSD', +-- +2.16.4 + |