From 7bc9c63c9da678a7e6fceb095d56c634afd22c56 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 15 Dec 2019 18:09:03 +0000 Subject: gentoo resync : 15.12.2019 --- dev-python/jedi/Manifest | 8 ++- dev-python/jedi/files/jedi-0.15.1-tests.patch | 94 +++++++++++++++++++++++++++ dev-python/jedi/jedi-0.10.2.ebuild | 1 + dev-python/jedi/jedi-0.12.1.ebuild | 3 +- dev-python/jedi/jedi-0.15.1.ebuild | 68 +++++++++++++++++++ 5 files changed, 171 insertions(+), 3 deletions(-) create mode 100644 dev-python/jedi/files/jedi-0.15.1-tests.patch create mode 100644 dev-python/jedi/jedi-0.15.1.ebuild (limited to 'dev-python/jedi') diff --git a/dev-python/jedi/Manifest b/dev-python/jedi/Manifest index 29e669c99ce3..af8d7a7402f9 100644 --- a/dev-python/jedi/Manifest +++ b/dev-python/jedi/Manifest @@ -1,10 +1,14 @@ AUX jedi-0.11.1-exclude-tests.patch 940 BLAKE2B 2c5540b62529a27a8beb8c3ca1b2f2c8b58e43e4116701b406ab62cd1d04ad3c0314430d33a7bdc9585647054a1820426fea270556dc1f959ac2a9da98738152 SHA512 9629d8a694f6deda3564c14234e92cf494e7c982bbab75729ffedc2c43c9167dfd23f45d47abb397bc8e1b732ed0649e290392bc2332585aa0ad312b188f6107 +AUX jedi-0.15.1-tests.patch 4110 BLAKE2B 3e99d214fa218bc2488aaad1a9d7bad16f26f0bcea07b96b4d8a5ae162df799a5747987961dac602186507015297183e81efc90bfc1dc6cf27585ab739629fc6 SHA512 394dcee9577a62abdc7a6c074c79fa801b0dbe04796d17333fcafd1344567d3c4f741d202e3d7929f23236f854a888b94679e1d061488967d621a37b1229a188 DIST jedi-0.10.2.tar.gz 373879 BLAKE2B 8007b31dc6c96d9538ab141b976fd4554ea16f01bb277692534a2972a6dcf61ee809c7573a7a3f7c0eceb29505de6ffe3ec0a7234a427579333b453fc9cd9dbc SHA512 847b000894b5e17cf5582c88245989ce1f0e17b595c79a2cdf4cc7a805fe7360ea08f28ac31473408be795c9ea210c85541cffa5fc7e7119da8c0228eb509351 DIST jedi-0.11.1.tar.gz 332402 BLAKE2B bc0a8df89c3d8b6cccc387a22cc08f613c990c59e360c58ae1d2becf521a755892afa4972195f6e40ec3bb48b74b20a966034d0e5bcad5051f90e5b4cc082270 SHA512 61389704a318f89d12b053b786bfb6bda21d2696830c001d6d6e66191fc060d731bc05ea71f2e70725532dcbe109c5c7346a36d227e6f8ab0eb2512f4c1a8945 DIST jedi-0.12.0.tar.gz 354329 BLAKE2B ef203f2ba57a90de1e16b80c8786fa25d6d459244873dfb22044aa6d080435efa976daeb80949c3fba41ca2f57feb5bfed255b3bb490e17b40b3f13dfbb31e14 SHA512 3e8280b16855cf2c891666f0fb02ac30d801279b72b5bcb64541ef7c152d9f9b165015405ee291cbccd6c9cb3c0481c24f30e6100cb4463888153021b946f16d DIST jedi-0.12.1.tar.gz 356736 BLAKE2B 515cbc27e065c24fb2cebae5a3807d2e025f22110f3de60d26a74475eadc985bb32bea60b691c580473fffe2fdfc86705187dea1fb730ef3f510b7bdb52e0d59 SHA512 92f9ac34abf908a8143dff360400dd8d6643dc3502bb7973f92bd05db94c2af151c2063f2de0481a14e26d11c009cc39c46189e1ea31d274b80802e3a10cd665 -EBUILD jedi-0.10.2.ebuild 983 BLAKE2B 4d63440c70f882301f4e399c13886c9c9517bfedb88bd1f87c78f98e67f3d7ee64be579dd760b477f726e7c93538b23ac798c5b4c710948635431b3c7a04ed19 SHA512 c134b6d2c705ea8cedbfc4124d47af704ba7f20d80486230fcb4cadb2c936742609a043bf7df09ebd95fe305845dbd9c6c3b2cfbc36c9c384aa96c66c3dceef3 +DIST jedi-0.15.1.tar.gz 412356 BLAKE2B a7738e8825b3f578db5e64d50cbf65219b4d2f2f81c45cbae9e3dbb858b0e1ef26d76972c112bfae839daaf73bba0d00b30b5708404d16b0385452500a1c2d35 SHA512 0f6e0185f3f10dbc000f09ddfed7b9596fe5dc270682544173dc156d505618ea14f1f44ede5d2357745ab8ded0b15b2788d064ca4db39fe70196982dd0a16893 +DIST typeshed-jedi_v0.15.0.tar.gz 466890 BLAKE2B 7c4956c60646ecb7f21704e3ce95cd38a44e40849e4efba352a0be11c4511fc28d77f32308a3f136cd72833f937f802194ae57f1cdf1d53ae7824ebe4f4bc323 SHA512 46250822eb4aa20203db9b99626e33f2b60ec77072e20dbd94219d782cf204e2cc5a94579b1753c634f931445ad4ef9f0bd7ccfed287d86bca96b945d2eb27c1 +EBUILD jedi-0.10.2.ebuild 1010 BLAKE2B b792034b1548f1c99f2f949f15db5a55980c003eeb896fe157de3caf2be43b77e1731cae7f6cfdaac931f79652806f0b2ec1803689761064932f2363c2fb9dde SHA512 64711f34814b8fe92b572c0652afd63660379d29041ca27087b1de62369a1d89438f050b4027945cb6fb964d99f03b4c1609cab0a552deed2d83283226275b01 EBUILD jedi-0.11.1.ebuild 1169 BLAKE2B 5e7b7649293d1fc5bf1548a3f16da5e2b86442c6acab689ad94976c4ea9dbe33f67498d8e018aeea25f69a760db8052eeb810a6977b1c1e962acf258c0106e9f SHA512 fc704a7d885c23d35e8996c37561d856b918dd059e5b5f6ad39d73b1c406648a333d3c7b593ba28dc3ccb1547b92fbe8dfa455bdfe99eb069745b6a38b9167e0 EBUILD jedi-0.12.0.ebuild 1032 BLAKE2B f019cd50fceb9c4667a7ba4c1126e2036e930ced9b12e2da3bf5dc87103285cc4ec69ea247dfa8b34f531cc1c3d6d9ab3668e315399ec70d816b1c4ea510db5d SHA512 2d2ec11f40735fe9b211c7aa6b5aaf5ad5880803fbbcbcb585f0fde214fb29b9c98710852844de43f3474e39ddca0f977d0531d10674f90edc6a211b31ef8113 -EBUILD jedi-0.12.1.ebuild 1740 BLAKE2B d54dcac48e8f26112176acace25bc39f8d3a58473a119926b7d492f10173ca667842a4b28a8ed14afbf38d131bed38a5e1f340d0e9eae3bb58809e453dff0999 SHA512 7bd15ef4c48acdc6c3766bfc7e48284ef792437db8d2ab2eefb64c3787e6ceba81ace99e3e0bc62e3b0bcbd2d946521a3d7c85cd9d9720c620f60e06e3547213 +EBUILD jedi-0.12.1.ebuild 1765 BLAKE2B 4a76b77e78432fb36e3c1efd1444c8626a70a525de60edd9226ca3a0a62ff423fcd2343100f2b1018fd17d1129e2b17a347b92b890af3b3712eb8cf7160c4243 SHA512 35892f353d6472eb46743b65aa28ef9745989ebd17ad9c8c3950079146b050e7ad7ac38e2c842fa85bc1b48f678b56294b5c4c0732e2b9c9d1b63582d582c63d +EBUILD jedi-0.15.1.ebuild 1890 BLAKE2B a9837eb57ce9aff18c460de8022ed9837cb440463024763139dd0070559d8cbfbf9a4e0578444d475dba9ace9e21e243c500f295e9368e32dafebc47153390f4 SHA512 bdca2cf4237f2ae957a2f72de5e1a2ce558929680d9472dabb2fb39fac50340f75b5160a94b53fc06de5044e9dfce49c43527e18ee20be204e4c825cb7ea2311 MISC metadata.xml 375 BLAKE2B fd65a43f1efc2cbde98dd68be5a47415ecec66d4d2b2c878235a1e77b24311062d6d9c16da79bdaa358b7910612a6460ea5cbc9efdb03a6fff5d2299d734841a SHA512 16271d48499888ad36f71d79301ddc361831a7263f3d0ad19d12c29b51c52c24806a7a366c6e263b4b6d43e28856cd336b0bd728fa00a5fe5111b505fdc50977 diff --git a/dev-python/jedi/files/jedi-0.15.1-tests.patch b/dev-python/jedi/files/jedi-0.15.1-tests.patch new file mode 100644 index 000000000000..cdc59053df03 --- /dev/null +++ b/dev-python/jedi/files/jedi-0.15.1-tests.patch @@ -0,0 +1,94 @@ +diff --git a/test/test_api/test_completion.py b/test/test_api/test_completion.py +index 178daee9..0c86f837 100644 +--- a/test/test_api/test_completion.py ++++ b/test/test_api/test_completion.py +@@ -1,4 +1,5 @@ +-from os.path import join, sep as s ++from os.path import join, sep as s, dirname ++import os + import sys + from textwrap import dedent + +@@ -164,6 +165,7 @@ f2 = join(root_dir, 'test', 'example.py') + os_path = 'from os.path import *\n' + # os.path.sep escaped + se = s * 2 if s == '\\' else s ++current_dirname = os.path.basename(dirname(dirname(dirname(__file__)))) + + + @pytest.mark.parametrize( +@@ -181,7 +183,7 @@ se = s * 2 if s == '\\' else s + ('test%sexample.py' % se, 'r"test%scomp"' % s, 5, ['t' + s]), + ('test%sexample.py' % se, 'r"test%scomp"' % s, 11, ['letion' + s]), + ('test%sexample.py' % se, '"%s"' % join('test', 'completion', 'basi'), 21, ['c.py']), +- ('example.py', 'rb"' + join('..', 'jedi', 'tes'), None, ['t' + s]), ++ ('example.py', 'rb"'+ join('..', current_dirname, 'tes'), None, ['t' + s]), + + # Absolute paths + (None, '"' + join(root_dir, 'test', 'test_ca'), None, ['che.py"']), +diff --git a/test/test_evaluate/test_signature.py b/test/test_evaluate/test_signature.py +index 0bb5cbae..2fda3d55 100644 +--- a/test/test_evaluate/test_signature.py ++++ b/test/test_evaluate/test_signature.py +@@ -16,7 +16,7 @@ from jedi.evaluate.gradual.conversion import _stub_to_python_context_set + ('str', "str(object='', /) -> str", ['object'], ge, (2, 7)), + + ('pow', 'pow(x, y, z=None, /) -> number', ['x', 'y', 'z'], lt, (3, 5)), +- ('pow', 'pow(x, y, z=None, /)', ['x', 'y', 'z'], ge, (3, 5)), ++ ('pow', 'pow(base, exp, mod=None)', ['base', 'exp', 'mod'], ge, (3, 8)), + + ('bytes.partition', 'partition(self, sep, /) -> (head, sep, tail)', ['self', 'sep'], lt, (3, 5)), + ('bytes.partition', 'partition(self, sep, /)', ['self', 'sep'], ge, (3, 5)), +diff --git a/test/test_evaluate/test_sys_path.py b/test/test_evaluate/test_sys_path.py +index deaa64ca..fdee2ece 100644 +--- a/test/test_evaluate/test_sys_path.py ++++ b/test/test_evaluate/test_sys_path.py +@@ -1,7 +1,9 @@ + import os ++import os.path + from glob import glob + import sys + import shutil ++import distutils.sysconfig + + import pytest + from ..helpers import skip_if_windows, skip_if_not_windows +@@ -33,12 +35,10 @@ def test_venv_and_pths(venv_path): + pjoin = os.path.join + + CUR_DIR = os.path.dirname(__file__) +- site_pkg_path = pjoin(venv_path, 'lib') +- if os.name == 'nt': +- site_pkg_path = pjoin(site_pkg_path, 'site-packages') +- else: +- site_pkg_path = glob(pjoin(site_pkg_path, 'python*', 'site-packages'))[0] +- shutil.rmtree(site_pkg_path) ++ site_pkg_path = pjoin(venv_path, ++ distutils.sysconfig.get_python_lib().lstrip(distutils.sysconfig.BASE_PREFIX)) ++ if os.path.exists(site_pkg_path): ++ shutil.rmtree(site_pkg_path) + shutil.copytree(pjoin(CUR_DIR, 'sample_venvs', 'pth_directory'), site_pkg_path) + + virtualenv = create_environment(venv_path) +diff --git a/test/test_utils.py b/test/test_utils.py +index 17328a36..71217086 100644 +--- a/test/test_utils.py ++++ b/test/test_utils.py +@@ -77,10 +77,14 @@ class TestSetupReadline(unittest.TestCase): + # There are minor differences, e.g. the dir doesn't include deleted + # items as well as items that are not only available on linux. + difference = set(self.completions(s)).symmetric_difference(goal) +- difference = {x for x in difference if not x.startswith('from os import _')} ++ difference = { ++ x for x in difference ++ if all(not x.startswith('from os import ' + s) ++ for s in ['_', 'O_', 'EX_', 'MFD_', 'SF_']) ++ } + # There are quite a few differences, because both Windows and Linux +- # (posix and nt) libraries are included. +- assert len(difference) < 38 ++ # (posix and nt) librariesare included. ++ assert len(difference) < 22 + + @cwd_at('test') + def test_local_import(self): diff --git a/dev-python/jedi/jedi-0.10.2.ebuild b/dev-python/jedi/jedi-0.10.2.ebuild index c05394f02abe..0af08cfafe55 100644 --- a/dev-python/jedi/jedi-0.10.2.ebuild +++ b/dev-python/jedi/jedi-0.10.2.ebuild @@ -15,6 +15,7 @@ LICENSE="MIT" SLOT="0" KEYWORDS="amd64 ~arm64 x86" IUSE="doc test" +RESTRICT="!test? ( test )" DEPEND=" dev-python/setuptools[${PYTHON_USEDEP}] diff --git a/dev-python/jedi/jedi-0.12.1.ebuild b/dev-python/jedi/jedi-0.12.1.ebuild index 763bf769e48c..2c05636baa09 100644 --- a/dev-python/jedi/jedi-0.12.1.ebuild +++ b/dev-python/jedi/jedi-0.12.1.ebuild @@ -12,8 +12,9 @@ SRC_URI="https://github.com/davidhalter/${PN}/archive/v${PV}.tar.gz -> ${P}.tar. LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~x86" IUSE="doc test" +RESTRICT="!test? ( test )" RDEPEND=">=dev-python/parso-0.3.1[${PYTHON_USEDEP}]" DEPEND=" diff --git a/dev-python/jedi/jedi-0.15.1.ebuild b/dev-python/jedi/jedi-0.15.1.ebuild new file mode 100644 index 000000000000..417f98aaef73 --- /dev/null +++ b/dev-python/jedi/jedi-0.15.1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} ) + +inherit distutils-r1 + +TYPESHED_PV="$(ver_cut 1-2).0" +TYPESHED_P="typeshed-jedi_v${TYPESHED_PV}" + +DESCRIPTION="Autocompletion library for Python" +HOMEPAGE="https://github.com/davidhalter/jedi" +SRC_URI="https://github.com/davidhalter/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/davidhalter/typeshed/archive/${TYPESHED_P#typeshed-}.tar.gz -> ${TYPESHED_P}.tar.gz" + +LICENSE="MIT + test? ( Apache-2.0 )" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="test" + +RDEPEND=">=dev-python/parso-0.5.0[${PYTHON_USEDEP}]" +BDEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] +" + +RESTRICT+=" !test? ( test )" + +PATCHES=( + # mostly pulled from upstream git, except the patch for + # test/test_evaluate/test_sys_path.py + "${FILESDIR}/jedi-0.15.1-tests.patch" +) + +distutils_enable_sphinx docs +distutils_enable_tests pytest + +python_prepare_all() { + # upstream includes this as a submodule ... + rmdir "${S}/jedi/third_party/typeshed" || die + mv "${WORKDIR}/${TYPESHED_P}" \ + "${S}/jedi/third_party/typeshed" || die + + # don't run doctests, don't depend on colorama + sed -i "s:'docopt',:: ; s:'colorama',::" setup.py || die + sed -i "s: --doctest-modules::" pytest.ini || die + + # speed tests are fragile + rm test/test_speed.py || die + + # 'path' completion test does not account for 'path' being a valid + # package (i.e. dev-python/path-py) + # https://github.com/davidhalter/jedi/issues/1210 + sed -i -e '/path.*not in/d' test/test_evaluate/test_imports.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + # at this point fixing tests on python2 isn't worth the effort... + if ! python_is_python3; then + ewarn "Skipping tests for ${EPYTHON}" + return 0 + fi + + pytest -vv || die "Tests fail with ${EPYTHON}" +} -- cgit v1.2.3