summaryrefslogtreecommitdiff
path: root/dev-python/astng
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/astng
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/astng')
-rw-r--r--dev-python/astng/Manifest7
-rw-r--r--dev-python/astng/astng-0.24.3-r1.ebuild51
-rw-r--r--dev-python/astng/astng-0.24.3.ebuild45
-rw-r--r--dev-python/astng/files/pypy-test.patch36
-rw-r--r--dev-python/astng/metadata.xml22
5 files changed, 161 insertions, 0 deletions
diff --git a/dev-python/astng/Manifest b/dev-python/astng/Manifest
new file mode 100644
index 000000000000..e40e8248f5d0
--- /dev/null
+++ b/dev-python/astng/Manifest
@@ -0,0 +1,7 @@
+AUX pypy-test.patch 1863 SHA256 261e06853dab43c55def0dc86a8380a80faf3e3364287850f6b9764d801419da SHA512 474805cd55ae930b3d2f0595549b74f8a718ad21de016204367f5513d69afc5a6ad4f43b44162a5b752a820f642ef5600c2c3f7e7111839b1d3ef0d95a7819ad WHIRLPOOL 14c14112d7c9def7096f97a44fedd82b5b042c96e098210cc4c6fb07502a702f5c86130e134d291f8754e8cc00a74733b972ebc84b36496bc74be945add2060b
+DIST logilab-astng-0.24.3.tar.gz 106660 SHA256 e08fba39689e5a4dfa175749874811e516f019656544874defe05154073f69d4 SHA512 fb1e46ebf7111d727cd9d187968cb349dc23dfba0d4d8c6c793a8c081d4506f11e488074cc51b632c525aa264cfa50279dda90f0cf35dc2120ebbf4714902525 WHIRLPOOL 75941724a2c4448a27b37750a83dbc04e4a02540233418b0eab364a3ddfdc3a5e03efacc58422d7fb6f68609f126e269c662aa17dbc395067b45182155559589
+EBUILD astng-0.24.3-r1.ebuild 1574 SHA256 15c8f317f715ad99ca5e58b492cdc1c2ce8d110839c16c0e1807ea27320d442c SHA512 5188cd9656a0bd967691bbbc4a28c091de93cc2044fdd4bf60668d4f5ac69c61575214f67485dbdfd1ee01364c6be23b608877a7cdfaa810e91418993e188a1f WHIRLPOOL ec3f784337a38b2ba9e985d0dd712345a8c4b6c8ff7ce313b36f5220ca144ef432d49a99442be62c764db730e104c856c95ec02fb2e21d9127d217e8a2bc0581
+EBUILD astng-0.24.3.ebuild 1470 SHA256 522e6094ab307ca758c6f6735d74f6c0c4bdaf16e9793dfcb645f50106ae2ce4 SHA512 d9023e522a2d1961150f5b14f96b290497f1ccb70166846860f585de6d8c7b063124e214c335e74938b364342c3bb58239bfee7615853712efd2adc6e3b49b71 WHIRLPOOL 1662120f92ead832edeaa033b0b0d783d1b8ada1fc10083e47fad90fcc05ae38346586bf4d51bf319524e18ff3734283c5fd3120f6a03a35f92a8e209ae483c9
+MISC ChangeLog 2718 SHA256 82bf6c1466a737d504f60c57b1c4fcecb9cce06a74137887a5943aa40038120b SHA512 30a3a4a29d14e2ab173ebcdccab77f970cf7834831ad74d43e6d3609a60a06d84c9a1fb01104fc5475911a21c6eb225f8d2826862753d0ee1e66de62ddb046d0 WHIRLPOOL d31d1ec225f646ad18f6ada54aa5b1bb282daebe8698cddb407b623b7ba63f544ed0321541874e6a9cf40133ab2cdb55e4ada66b6900cb219cc75d4c1fc18f7e
+MISC ChangeLog-2015 11553 SHA256 7b1f5e7f02aa7b6f089102d59c0b0506a7480d1b3186ac10b312874710ccb580 SHA512 ae2ea264f0e7d588f84107bd4e85b3cb970b1515b6fcb84bf2d2ac77c1b6a62cd8bd9187620913a52b4221a3bd5d9a68e3202020c4dc7c229aaae195f9bedfdc WHIRLPOOL 107957bb3a95c57df29b29e2cffb85058e1e544324db4adf55237cb8510685b68e66859c505b8a7cdb325cc114cf33fff24f127e1ea82eaa1bdea7bb0bb94c93
+MISC metadata.xml 1068 SHA256 805aa8de63143d3ad9be5539436bb67a5b8ed8f53a27571c39e5bff838de30dc SHA512 c31304cd3895351242c47fef547bc6277421cc634b63862bbb84de081b0638a3020a6347510fff386d78aad432ee6382f8d7f4e1766aa1af32c2b44e83425cc2 WHIRLPOOL ef1441f5ccdea220f5e2838cfda96a0ae22740213fbd0c1a18ebb9c45757fb5818c40af60873a714b744b4e8acc9638bd5e28b3c2ed2eef15dfeba1ea0ac2df6
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..3355475067af
--- /dev/null
+++ b/dev-python/astng/astng-0.24.3-r1.ebuild
@@ -0,0 +1,51 @@
+# 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} pypy )
+
+inherit distutils-r1
+
+DESCRIPTION="Abstract Syntax Tree for logilab packages"
+HOMEPAGE="http://www.logilab.org/project/logilab-astng https://pypi.python.org/pypi/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..3026a1ad64d0
--- /dev/null
+++ b/dev-python/astng/astng-0.24.3.ebuild
@@ -0,0 +1,45 @@
+# 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} pypy )
+
+inherit distutils-r1
+
+DESCRIPTION="Abstract Syntax Tree for logilab packages"
+HOMEPAGE="http://www.logilab.org/project/logilab-astng https://pypi.python.org/pypi/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>