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/pycparser | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/pycparser')
-rw-r--r-- | dev-python/pycparser/Manifest | 8 | ||||
-rw-r--r-- | dev-python/pycparser/files/pycparser-2.18-OO.patch | 56 | ||||
-rw-r--r-- | dev-python/pycparser/metadata.xml | 12 | ||||
-rw-r--r-- | dev-python/pycparser/pycparser-2.14.ebuild | 33 | ||||
-rw-r--r-- | dev-python/pycparser/pycparser-2.17.ebuild | 42 | ||||
-rw-r--r-- | dev-python/pycparser/pycparser-2.18-r1.ebuild | 52 |
6 files changed, 203 insertions, 0 deletions
diff --git a/dev-python/pycparser/Manifest b/dev-python/pycparser/Manifest new file mode 100644 index 000000000000..57af872bc614 --- /dev/null +++ b/dev-python/pycparser/Manifest @@ -0,0 +1,8 @@ +AUX pycparser-2.18-OO.patch 2224 BLAKE2B 38955919380a0ec7dbaacde434a327b9842be0285f830b7b7de67d00b7fee27f2b15d56e0a90ba777b799f00cb54f59abd3985a8cdceeda9e16e324699427b0f SHA512 b9568bc4fb06015497f8fd7c56ee4312c07d0d7621a84aa946254ebd4e80da8fe4c94c13065780666a44e5d8d3bb72271e9703c7c5af39325f2b699c250bf71b +DIST pycparser-2.14.tar.gz 223295 BLAKE2B 13dd4e36d7239db4fd6dfb77f08088bdbffa897ab75d748da5bd7297fe0a7dd751ba7153f8bf15f93494e347c653d1ebc7250907d2ccc555e785830e731e93dc SHA512 d5b9ab434a8944898ac23a4f51189db77b02b993bf3e3ca018852b117fc0eb43e460b156beaa5c1d631ad71c81e1649113e9fff7e33506b1e7d4de24d8b464c6 +DIST pycparser-2.17.tar.gz 231163 BLAKE2B b264fbdf235f63559c96d103ca42fd0faf2c5e125420e75503e7dc2cc6e86a23347b9070a33b1e28721b919d89d0281b69b04c2761b180fa535c748933392172 SHA512 c9caaa8d256748e0623d077b11931abb38d19367136c70a835f7587e1f7ceb64f3acb7a983dcb68bedd2cf187517762a5753844e8ed58d1d9ed6f364c55839b4 +DIST pycparser-2.18.tar.gz 245897 BLAKE2B 2f47263c73763f9d76edcb0d90aacd2e6cf0a68ed2e8c5825a0788a5ccb6574167220a5bb7605b2c11dda8956ce8fb1ad28eeb8e91fed7aa0282191b11478b63 SHA512 4754e4e7556d21da328bf7dbabf72f940c9b18f1457260d48208033b05e576919f45ab399e86ea49e82120116980d7d6f53e8b959d21b7b03a3b5bbea3672f13 +EBUILD pycparser-2.14.ebuild 933 BLAKE2B d8d4b0647e4418b862c156d09fda502480147bc080b85ec45aec4e13e816b79b0868dafab2eccf4c31eb1a18bfcf5f0da67fc7504b647f0761a1c132959659dd SHA512 ba616d6faf9e158c3df3754dfad56cc596f56613cd44f05f9da7b8779b7a8508956852729ad586d47ff33ed77d38eef030ded8be6affa9179ccd080a17cdc9d7 +EBUILD pycparser-2.17.ebuild 1262 BLAKE2B 6ed786693227a34be8c60abbd17d6c6b7c95c539e5d1d4161fd3b5d53b20fb8c7e5a50237afafb33a0305e1f7048d1a69a209300ee44978bdcdf80c4d16b2de8 SHA512 2308dc89f2e277ba7195b892258ba82075365caa7f774f92ed89ab78152b856a83c6d17c473a1162a1d48312164dfdaac7afa1e1f4a47e3ce03bc9e87914e80f +EBUILD pycparser-2.18-r1.ebuild 1521 BLAKE2B c3beefe7dd127a091ef540b99ed1f5b66203347d410756407c67deb9b86e64e605ac8b7c216e873d3fa2b7bd53c740287d853a7b93bca0224f210605251280f6 SHA512 c4440190d9b81180275d2a43d44a61f2668f4599e55c2ed7ab80534cf2e947751e17d4075688b246195ca6434d3efe9e755e0c056dfe2767975bf35cf4a08449 +MISC metadata.xml 380 BLAKE2B b013fa2cb5c61b39b122c1c051ce40a8c002d4d4c6995ab78e0f3a35cec07d2f81cb5b05326ddac9c2526eb3ebcf90bc2660f588c4ebe5bacbd1a861fcf91985 SHA512 98ca8c63733123ae6a1d1c8b338d5f98a679b8f84b1e0abed8dc7fefa5549735a7f4de9a5851a26507a6169336fa46689616e46a49df0e9a52f6efb669eac865 diff --git a/dev-python/pycparser/files/pycparser-2.18-OO.patch b/dev-python/pycparser/files/pycparser-2.18-OO.patch new file mode 100644 index 000000000000..ae42b2b9bd1d --- /dev/null +++ b/dev-python/pycparser/files/pycparser-2.18-OO.patch @@ -0,0 +1,56 @@ +From 673accec311a027c22b0718d753f8da922915305 Mon Sep 17 00:00:00 2001 +From: Eli Bendersky <eliben@gmail.com> +Date: Thu, 13 Jul 2017 20:25:29 -0700 +Subject: [PATCH] Address an import of pycparser in -OO mode. + +In this mode there are no docstrings; we don't want an instantiation of CParser +to fail, though it won't actually work correctly if used. + +See #197 and #198 +--- + pycparser/plyparser.py | 21 +++++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +diff --git a/pycparser/plyparser.py b/pycparser/plyparser.py +index af91922..b6640fa 100644 +--- a/pycparser/plyparser.py ++++ b/pycparser/plyparser.py +@@ -8,6 +8,7 @@ + # License: BSD + #----------------------------------------------------------------- + ++import warnings + + class Coord(object): + """ Coordinates of a syntactic element. Consists of: +@@ -87,12 +88,28 @@ def template(cls): + + See `parameterized` for more information on parameterized rules. + """ ++ issued_nodoc_warning = False + for attr_name in dir(cls): + if attr_name.startswith('p_'): + method = getattr(cls, attr_name) + if hasattr(method, '_params'): +- delattr(cls, attr_name) # Remove template method +- _create_param_rules(cls, method) ++ # Remove the template method ++ delattr(cls, attr_name) ++ # Create parameterized rules from this method; only run this if ++ # the method has a docstring. This is to address an issue when ++ # pycparser's users are installed in -OO mode which strips ++ # docstrings away. ++ # See: https://github.com/eliben/pycparser/pull/198/ and ++ # https://github.com/eliben/pycparser/issues/197 ++ # for discussion. ++ if method.__doc__ is not None: ++ _create_param_rules(cls, method) ++ elif not issued_nodoc_warning: ++ warnings.warn( ++ 'parsing methods must have __doc__ for pycparser to work properly', ++ RuntimeWarning, ++ stacklevel=2) ++ issued_nodoc_warning = True + return cls + + diff --git a/dev-python/pycparser/metadata.xml b/dev-python/pycparser/metadata.xml new file mode 100644 index 000000000000..27f42a2d52ec --- /dev/null +++ b/dev-python/pycparser/metadata.xml @@ -0,0 +1,12 @@ +<?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> + <upstream> + <remote-id type="pypi">pycparser</remote-id> + <remote-id type="github">eliben/pycparser</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/pycparser/pycparser-2.14.ebuild b/dev-python/pycparser/pycparser-2.14.ebuild new file mode 100644 index 000000000000..6b37a293405d --- /dev/null +++ b/dev-python/pycparser/pycparser-2.14.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 ) + +inherit distutils-r1 vcs-snapshot + +DESCRIPTION="C parser and AST generator written in Python" +HOMEPAGE="https://github.com/eliben/pycparser" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris" +IUSE="test" + +RDEPEND="dev-python/ply[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/nose[${PYTHON_USEDEP}] )" + +python_compile() { + distutils-r1_python_compile + pushd "${BUILD_DIR}/lib/pycparser" > /dev/null || die + "${PYTHON}" _build_tables.py || die + popd > /dev/null || die +} + +python_test() { + nosetests || die +} diff --git a/dev-python/pycparser/pycparser-2.17.ebuild b/dev-python/pycparser/pycparser-2.17.ebuild new file mode 100644 index 000000000000..ba18c49470cd --- /dev/null +++ b/dev-python/pycparser/pycparser-2.17.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 ) + +inherit distutils-r1 vcs-snapshot + +DESCRIPTION="C parser and AST generator written in Python" +HOMEPAGE="https://github.com/eliben/pycparser" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris" +IUSE="test" + +RDEPEND="dev-python/ply[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/nose[${PYTHON_USEDEP}] )" + +pkg_pretend() { + if has_version "=dev-python/pycparser-2.16"; then + eerror "You have a broken version of dev-python/pycparser installed." + eerror "Please remove the broken version before continuing." + eerror "eg. emerge --unmerge =dev-python/pycparser-2.16" + die "Broken dev-python/pycparser" + fi +} + +python_compile() { + distutils-r1_python_compile + pushd "${BUILD_DIR}/lib/pycparser" > /dev/null || die + "${PYTHON}" _build_tables.py || die + popd > /dev/null || die +} + +python_test() { + nosetests || die +} diff --git a/dev-python/pycparser/pycparser-2.18-r1.ebuild b/dev-python/pycparser/pycparser-2.18-r1.ebuild new file mode 100644 index 000000000000..2d84ac8f8c77 --- /dev/null +++ b/dev-python/pycparser/pycparser-2.18-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="C parser and AST generator written in Python" +HOMEPAGE="https://github.com/eliben/pycparser" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris" +IUSE="test" + +RDEPEND="dev-python/ply:=[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/nose[${PYTHON_USEDEP}] )" + +PATCHES=( + "${FILESDIR}"/pycparser-2.18-OO.patch +) + +python_prepare_all() { + # remove the original files to guarantee their regen + rm pycparser/{c_ast,lextab,yacctab}.py || die + + # kill sys.path manipulations to force the tests to use built files + sed -i -e '/sys\.path/d' tests/*.py || die + + distutils-r1_python_prepare_all +} + +python_compile() { + distutils-r1_python_compile + + # note: tables built by py3.5+ are incompatible with older versions + # because of 100 group limit of 're' module -- just generate them + # separately optimized for each target instead + pushd "${BUILD_DIR}"/lib/pycparser > /dev/null || die + "${PYTHON}" _build_tables.py || die + popd > /dev/null || die +} + +python_test() { + # change workdir to avoid '.' import + nosetests -v -w tests || die +} |