diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/astng | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/astng')
-rw-r--r-- | dev-python/astng/Manifest | 5 | ||||
-rw-r--r-- | dev-python/astng/astng-0.24.3-r1.ebuild | 51 | ||||
-rw-r--r-- | dev-python/astng/astng-0.24.3.ebuild | 45 | ||||
-rw-r--r-- | dev-python/astng/files/pypy-test.patch | 36 | ||||
-rw-r--r-- | dev-python/astng/metadata.xml | 22 |
5 files changed, 159 insertions, 0 deletions
diff --git a/dev-python/astng/Manifest b/dev-python/astng/Manifest new file mode 100644 index 000000000000..11a3b02c3d1e --- /dev/null +++ b/dev-python/astng/Manifest @@ -0,0 +1,5 @@ +AUX pypy-test.patch 1863 BLAKE2B 4d0cb211cd9129f8a8cef2a8e15e169a23024bd30c065c6e7109f9044a7d9bd017a2d7ec121a652e6d94433f91d491626ca984202eecc85dde19cfa8ca3f6947 SHA512 474805cd55ae930b3d2f0595549b74f8a718ad21de016204367f5513d69afc5a6ad4f43b44162a5b752a820f642ef5600c2c3f7e7111839b1d3ef0d95a7819ad +DIST logilab-astng-0.24.3.tar.gz 106660 BLAKE2B 0f82787fc0a3de025fb2921d0e94ca8e2ee33dfe636c9ad55f6494983467c8acfdab0aa83e7f84f1525697a6a5317569ff51537732a90ccdec2646f380b316ac SHA512 fb1e46ebf7111d727cd9d187968cb349dc23dfba0d4d8c6c793a8c081d4506f11e488074cc51b632c525aa264cfa50279dda90f0cf35dc2120ebbf4714902525 +EBUILD astng-0.24.3-r1.ebuild 1572 BLAKE2B 8118ddce7e4edf07126eaab8c3c76ee8740fc233c0c51d5167e790ce70da55fc1fc3b0d941829343f6112e09f8ac526e11811d68ba18e438ea4f0122d76c8946 SHA512 d65d12a96c937eafb1577301f5c911904662b825b7fae728c33d7f584e989ad7592b0fdb802988db72df7d5a37311d664f1cdc4ada7d0e06c379779a89b64b9b +EBUILD astng-0.24.3.ebuild 1468 BLAKE2B 3644639859e5a92bacc0808fff4fd50f7fd738d8fdc3d10267633af8e69c7592415b980105d55c85e4e79abbcb0e534f01d3daa485cbd8f631837fa5fd91049d SHA512 e6e1ec7f70afdbfe2d0f5b3cc4fcf6d75adb47cb9ddd5c5676eaa7fe568d9cbd1d7a8d98bbfb6d4bb59aaf244dd9aa6c7e79de2acdc1f578073b6db4e6bc3793 +MISC metadata.xml 1068 BLAKE2B 0c0056ab7befb8cd391372534f9c7c84fb8f44a789446ec06b5653606d2748341342fc3a7b3886891930faa86404cc831cff0d8825691e99237c01f5e7e04e29 SHA512 c31304cd3895351242c47fef547bc6277421cc634b63862bbb84de081b0638a3020a6347510fff386d78aad432ee6382f8d7f4e1766aa1af32c2b44e83425cc2 diff --git a/dev-python/astng/astng-0.24.3-r1.ebuild b/dev-python/astng/astng-0.24.3-r1.ebuild new file mode 100644 index 000000000000..c082787d9da0 --- /dev/null +++ b/dev-python/astng/astng-0.24.3-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2018 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} pypy ) + +inherit distutils-r1 + +DESCRIPTION="Abstract Syntax Tree for logilab packages" +HOMEPAGE="https://www.logilab.org/project/logilab-astng https://pypi.org/project/logilab-astng/" +SRC_URI="ftp://ftp.logilab.org/pub/astng/logilab-${P}.tar.gz mirror://pypi/l/logilab-astng/logilab-${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-macos ~x86-macos" +IUSE="test" + +# 1.2.2-r1 for namespace files +RDEPEND=">=dev-python/logilab-common-1.2.2-r1[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( >=dev-python/egenix-mx-base-3.0.0[$(python_gen_usedep 'python2*')] )" + +S="${WORKDIR}/logilab-${P}" +RESTRICT="test" # erroneous failures + +# a wit; pypy reports astng modules differently +PATCHES=( "${FILESDIR}"/pypy-test.patch ) + +python_test() { + distutils_install_for_testing + # test target needs unpacked test directories, doesn't like binary egg + esetup.py install_lib --install-dir="${TEST_DIR}"/lib + #https://bitbucket.org/logilab/astroid/issue/1/test-suite-fails-in-0243-under-py32-pypy + # Make sure that the tests use correct modules. + cd "${TEST_DIR}"/lib || die + pytest -v || die "Tests fail with ${EPYTHON}" +} + +python_install() { + distutils-r1_python_install + + rm "${D}$(python_get_sitedir)/logilab/__init__.py" || die +} + +python_install_all() { + distutils-r1_python_install_all + + find "${D}" -name '*.pth' -delete || die +} diff --git a/dev-python/astng/astng-0.24.3.ebuild b/dev-python/astng/astng-0.24.3.ebuild new file mode 100644 index 000000000000..4bbd302c3dd6 --- /dev/null +++ b/dev-python/astng/astng-0.24.3.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2018 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} pypy ) + +inherit distutils-r1 + +DESCRIPTION="Abstract Syntax Tree for logilab packages" +HOMEPAGE="https://www.logilab.org/project/logilab-astng https://pypi.org/project/logilab-astng/" +SRC_URI="ftp://ftp.logilab.org/pub/astng/logilab-${P}.tar.gz mirror://pypi/l/logilab-astng/logilab-${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86 ~x64-macos ~x86-macos" +IUSE="test" + +# Version specified in __pkginfo__.py. +RDEPEND=">=dev-python/logilab-common-0.59.0[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( >=dev-python/egenix-mx-base-3.0.0[$(python_gen_usedep 'python2*')] )" + +S="${WORKDIR}/logilab-${P}" +RESTRICT="test" # erroneous failures + +# a wit; pypy reports astng modules differently +PATCHES=( "${FILESDIR}"/pypy-test.patch ) + +python_test() { + distutils_install_for_testing + # test target needs unpacked test directories, doesn't like binary egg + esetup.py install_lib --install-dir="${TEST_DIR}"/lib + #https://bitbucket.org/logilab/astroid/issue/1/test-suite-fails-in-0243-under-py32-pypy + # Make sure that the tests use correct modules. + cd "${TEST_DIR}"/lib || die + pytest -v || die "Tests fail with ${EPYTHON}" +} + +python_install() { + distutils-r1_python_install + + rm "${D}$(python_get_sitedir)/logilab/__init__.py" || die +} diff --git a/dev-python/astng/files/pypy-test.patch b/dev-python/astng/files/pypy-test.patch new file mode 100644 index 000000000000..42cb3864b43b --- /dev/null +++ b/dev-python/astng/files/pypy-test.patch @@ -0,0 +1,36 @@ +diff -ur logilab-astng-0.24.3.orig/test/unittest_builder.py logilab-astng-0.24.3/test/unittest_builder.py +--- test/unittest_builder.py 2013-04-17 17:38:31.000000000 +0800 ++++ test/unittest_builder.py 2013-06-19 02:13:51.425269363 +0800 +@@ -62,8 +62,12 @@ + self.assertEqual(name.tolineno, 4) + strarg = callfunc.args[0] + self.assertIsInstance(strarg, nodes.Const) +- self.assertEqual(strarg.fromlineno, 5) # no way for this one (is 4 actually) +- self.assertEqual(strarg.tolineno, 5) ++ if hasattr(sys, 'pypy_version_info'): ++ self.assertEqual(strarg.fromlineno, 4) # no way for this one (is 4 actually) ++ self.assertEqual(strarg.tolineno, 4) ++ else: ++ self.assertEqual(strarg.fromlineno, 5) # no way for this one (is 4 actually) ++ self.assertEqual(strarg.tolineno, 5) + namearg = callfunc.args[1] + self.assertIsInstance(namearg, nodes.Name) + self.assertEqual(namearg.fromlineno, 5) +diff -ur logilab-astng-0.24.3.orig/test/unittest_inference.py logilab-astng-0.24.3/test/unittest_inference.py +--- test/unittest_inference.py 2013-04-17 17:38:31.000000000 +0800 ++++ test/unittest_inference.py 2013-06-19 02:52:41.618270007 +0800 +@@ -710,8 +710,12 @@ + node = get_name_node(astng, 'open', -1) + infered = list(node.infer()) + self.assertEqual(len(infered), 1) +- self.assertIsInstance(infered[0], nodes.Function) +- self.assertEqual(infered[0].name, 'open') ++ if hasattr(sys, 'pypy_version_info'): ++ self.assertIsInstance(infered[0], nodes.Class) ++ self.assertEqual(infered[0].name, 'file') ++ else: ++ self.assertIsInstance(infered[0], nodes.Function) ++ self.assertEqual(infered[0].name, 'open') + + def test_callfunc_context_func(self): + code = ''' diff --git a/dev-python/astng/metadata.xml b/dev-python/astng/metadata.xml new file mode 100644 index 000000000000..b7ac41e3d53b --- /dev/null +++ b/dev-python/astng/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <longdescription lang="en">The aim of this module is to provide a common base representation of + python source code for projects such as pychecker, pyreverse, + pylint... Well, actually the development of this library is + essentially governed by pylint's needs. + It provides a compatible representation which comes from the _ast + module. It rebuilds the tree generated by the builtin _ast module by + recursively walking down the AST and building an extended ast (let's + call it astng ;). The new node classes have additional methods and + attributes for different usages. They include some support for static + inference and local name scopes. Furthermore, astng builds partial + trees by inspecting living objects.</longdescription> + <upstream> + <remote-id type="pypi">logilab-astng</remote-id> + </upstream> +</pkgmetadata> |