public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/jedi/, dev-python/jedi/files/
@ 2018-02-06  1:53 Tim Harder
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Harder @ 2018-02-06  1:53 UTC (permalink / raw
  To: gentoo-commits

commit:     cdb4a4c747fcabfbdbc5c709c559b1669d0b0ae6
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  6 01:46:31 2018 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Tue Feb  6 01:51:59 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdb4a4c7

dev-python/jedi: version bump to 0.11.1

 dev-python/jedi/Manifest                           |  1 +
 .../jedi/files/jedi-0.11.1-exclude-tests.patch     | 26 +++++++++++
 dev-python/jedi/jedi-0.11.1.ebuild                 | 51 ++++++++++++++++++++++
 3 files changed, 78 insertions(+)

diff --git a/dev-python/jedi/Manifest b/dev-python/jedi/Manifest
index 2ac7fdc76cd..aa9d365820a 100644
--- a/dev-python/jedi/Manifest
+++ b/dev-python/jedi/Manifest
@@ -1 +1,2 @@
 DIST jedi-0.10.2.tar.gz 373879 BLAKE2B 8007b31dc6c96d9538ab141b976fd4554ea16f01bb277692534a2972a6dcf61ee809c7573a7a3f7c0eceb29505de6ffe3ec0a7234a427579333b453fc9cd9dbc SHA512 847b000894b5e17cf5582c88245989ce1f0e17b595c79a2cdf4cc7a805fe7360ea08f28ac31473408be795c9ea210c85541cffa5fc7e7119da8c0228eb509351
+DIST jedi-0.11.1.tar.gz 332402 BLAKE2B bc0a8df89c3d8b6cccc387a22cc08f613c990c59e360c58ae1d2becf521a755892afa4972195f6e40ec3bb48b74b20a966034d0e5bcad5051f90e5b4cc082270 SHA512 61389704a318f89d12b053b786bfb6bda21d2696830c001d6d6e66191fc060d731bc05ea71f2e70725532dcbe109c5c7346a36d227e6f8ab0eb2512f4c1a8945

diff --git a/dev-python/jedi/files/jedi-0.11.1-exclude-tests.patch b/dev-python/jedi/files/jedi-0.11.1-exclude-tests.patch
new file mode 100644
index 00000000000..a85af80d4c9
--- /dev/null
+++ b/dev-python/jedi/files/jedi-0.11.1-exclude-tests.patch
@@ -0,0 +1,26 @@
+From 4e52acbf26b6d52e26e757cb04817d17c5464331 Mon Sep 17 00:00:00 2001
+From: Dave Halter <davidhalter88@gmail.com>
+Date: Sun, 7 Jan 2018 14:13:21 +0100
+Subject: [PATCH] Using setup.py build should not include part of tests
+
+It looks like that we have to not only exclude the test package but also 'test.*'. Thanks to @david-geiger for noticing this. Fixes #1024.
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 3f3b7e54..c7081858 100755
+--- a/setup.py
++++ b/setup.py
+@@ -32,7 +32,7 @@ setup(name='jedi',
+       license='MIT',
+       keywords='python completion refactoring vim',
+       long_description=readme,
+-      packages=find_packages(exclude=['test']),
++      packages=find_packages(exclude=['test', 'test.*']),
+       install_requires=install_requires,
+       extras_require={'dev': ['docopt']},
+       package_data={'jedi': ['evaluate/compiled/fake/*.pym']},
+-- 
+2.16.1
+

diff --git a/dev-python/jedi/jedi-0.11.1.ebuild b/dev-python/jedi/jedi-0.11.1.ebuild
new file mode 100644
index 00000000000..7aac943f7a2
--- /dev/null
+++ b/dev-python/jedi/jedi-0.11.1.ebuild
@@ -0,0 +1,51 @@
+# 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} )
+
+inherit distutils-r1
+
+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"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="doc test"
+
+RDEPEND=">=dev-python/parso-0.1.1[${PYTHON_USEDEP}]"
+DEPEND="
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	doc? ( dev-python/sphinx )
+	test? (
+		dev-python/pytest[${PYTHON_USEDEP}]
+		${RDEPEND}
+	)"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.11.1-exclude-tests.patch )
+
+# various misc failures
+RESTRICT="test"
+
+src_prepare() {
+	# skip integration and speed tests
+	rm test/test_{integration,speed}* || die
+
+	distutils-r1_python_prepare_all
+}
+
+python_test() {
+	PYTHONPATH="${PYTHONPATH%:}${PYTHONPATH+:}${S}/test" py.test -v test \
+		|| die "Tests failed under ${EPYTHON}"
+}
+
+python_compile_all() {
+	use doc && emake -C docs html
+}
+
+python_install_all() {
+	use doc && HTML_DOCS=( "${S}"/docs/_build/html/. )
+	distutils-r1_python_install_all
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/jedi/, dev-python/jedi/files/
@ 2019-12-03  0:54 Patrick McLean
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McLean @ 2019-12-03  0:54 UTC (permalink / raw
  To: gentoo-commits

commit:     825d5b2157072fadf14ddccf0bf86cfa51e74254
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Tue Dec  3 00:54:27 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Tue Dec  3 00:54:27 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=825d5b21

dev-python/jedi-0.15.1: Version bump, add py38

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.80, Repoman-2.3.19
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-python/jedi/Manifest                      |  2 +
 dev-python/jedi/files/jedi-0.15.1-tests.patch | 94 +++++++++++++++++++++++++++
 dev-python/jedi/jedi-0.15.1.ebuild            | 68 +++++++++++++++++++
 3 files changed, 164 insertions(+)

diff --git a/dev-python/jedi/Manifest b/dev-python/jedi/Manifest
index cf317547cbe..4960101dd42 100644
--- a/dev-python/jedi/Manifest
+++ b/dev-python/jedi/Manifest
@@ -2,3 +2,5 @@ DIST jedi-0.10.2.tar.gz 373879 BLAKE2B 8007b31dc6c96d9538ab141b976fd4554ea16f01b
 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
+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

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 00000000000..cdc59053df0
--- /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.15.1.ebuild b/dev-python/jedi/jedi-0.15.1.ebuild
new file mode 100644
index 00000000000..417f98aaef7
--- /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}"
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-03  0:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-03  0:54 [gentoo-commits] repo/gentoo:master commit in: dev-python/jedi/, dev-python/jedi/files/ Patrick McLean
  -- strict thread matches above, loose matches on Subject: below --
2018-02-06  1:53 Tim Harder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox