summaryrefslogtreecommitdiff
path: root/dev-python/pycparser
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/pycparser
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/pycparser')
-rw-r--r--dev-python/pycparser/Manifest10
-rw-r--r--dev-python/pycparser/files/pycparser-2.18-OO.patch56
-rw-r--r--dev-python/pycparser/metadata.xml12
-rw-r--r--dev-python/pycparser/pycparser-2.14.ebuild33
-rw-r--r--dev-python/pycparser/pycparser-2.17.ebuild42
-rw-r--r--dev-python/pycparser/pycparser-2.18-r1.ebuild52
6 files changed, 205 insertions, 0 deletions
diff --git a/dev-python/pycparser/Manifest b/dev-python/pycparser/Manifest
new file mode 100644
index 000000000000..4b5bd69b8481
--- /dev/null
+++ b/dev-python/pycparser/Manifest
@@ -0,0 +1,10 @@
+AUX pycparser-2.18-OO.patch 2224 SHA256 2d7eed0b900811c6b6784302d6226488efd6084060e6ee52c307bae2c25fa63c SHA512 b9568bc4fb06015497f8fd7c56ee4312c07d0d7621a84aa946254ebd4e80da8fe4c94c13065780666a44e5d8d3bb72271e9703c7c5af39325f2b699c250bf71b WHIRLPOOL 406933af36a5dd9c7df3c37044e863bf5b7efe7a0a18816bb0b09b66126c567a445a7fd106b1a924b8bbf5f424fdeb53fa87c6d642f55ef1af00ea81a91f9077
+DIST pycparser-2.14.tar.gz 223295 SHA256 7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73 SHA512 d5b9ab434a8944898ac23a4f51189db77b02b993bf3e3ca018852b117fc0eb43e460b156beaa5c1d631ad71c81e1649113e9fff7e33506b1e7d4de24d8b464c6 WHIRLPOOL 4a541ce696298a355d4e3325a10dffd47bd26756b0164da82b70090310edfacf0428ed9e26de7be7e3d4c2c952ee664262a212562852fe29f909ab0631bfd79f
+DIST pycparser-2.17.tar.gz 231163 SHA256 0aac31e917c24cb3357f5a4d5566f2cc91a19ca41862f6c3c22dc60a629673b6 SHA512 c9caaa8d256748e0623d077b11931abb38d19367136c70a835f7587e1f7ceb64f3acb7a983dcb68bedd2cf187517762a5753844e8ed58d1d9ed6f364c55839b4 WHIRLPOOL 4d3585a8c95add8b607bb79b89f8c00d16ab9361cfc72b65a5112b756b8d965cdc9c19af36ab7a73647425788e9121eafd6b0da01c2ca8de6d2b00ed5d097bba
+DIST pycparser-2.18.tar.gz 245897 SHA256 99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226 SHA512 4754e4e7556d21da328bf7dbabf72f940c9b18f1457260d48208033b05e576919f45ab399e86ea49e82120116980d7d6f53e8b959d21b7b03a3b5bbea3672f13 WHIRLPOOL de6661b661a5b85f39a53183eccfd99d8a89f87e717630964ed1d988b4dd1b5e7ffe7aae6f034fafc2e73b40871dbd75ddf21663356d3152f989d244512019c7
+EBUILD pycparser-2.14.ebuild 933 SHA256 1017ab63dfcb701535b78f3cf824c617b22ac4c63980dcf38a046b521fc78663 SHA512 ba616d6faf9e158c3df3754dfad56cc596f56613cd44f05f9da7b8779b7a8508956852729ad586d47ff33ed77d38eef030ded8be6affa9179ccd080a17cdc9d7 WHIRLPOOL 2433c7d6f990d3499a923618aef29e46514b55f4bedc1563996fb8d7a49cf0c9f80137950ab390a5d6983792a6027a49e7d7cb3c2f9f7fab9bd9fafb847a1a7b
+EBUILD pycparser-2.17.ebuild 1262 SHA256 d4b5fbd3aacdf50ba0c5397f22486a7c8dfa5bd50b34a476497c904dd1dcf34e SHA512 2308dc89f2e277ba7195b892258ba82075365caa7f774f92ed89ab78152b856a83c6d17c473a1162a1d48312164dfdaac7afa1e1f4a47e3ce03bc9e87914e80f WHIRLPOOL ac9b18d3cbb4a4ff4abff2142f0ba07a4000f3807fd0ea720c37894731e55b167df75f72e1626b408f603c67da2c196028b72043e1b67d84f0f6acee1a5cc91e
+EBUILD pycparser-2.18-r1.ebuild 1509 SHA256 9b324fe479b89976a28853475c0c865bac9eb91fff658972e0629569b8fae2de SHA512 fb4e375cff456855f2861464e6da170bf8e2952f56c854e3e5f9a70486859687b9ce227f5b4e982e68a62557c6e631ad89c517a8ae44cc325ab09d0d22152057 WHIRLPOOL db79852e0f2d8c43689a23132ec181eff0ed8d623e76479f027b13a7be921dded037265434225d8bab5ed5af0569e1dfcd9019de1f0d4c7083efc041016ed0aa
+MISC ChangeLog 5881 SHA256 fee6b66b21b5854d390219d0204e0f538081ffc0485cabe23c8b7384723f2c8f SHA512 b4bfafe106b826bba18ebcf262e4bf7426e7b2ed9b6ca7c957cff68b4db3638b43c460a3135eae36c0ea023eed9cc6fc9a2ba7d23f11dcdc1e1e46d4a64bb0e4 WHIRLPOOL ca95a1ba212fe868f37db8912dc3e0a2373679edab2f658c24dc5f3aa596a622561a5113d19b46d5726d6fe3ec0f57b16379be259d0c637eb5f96424046ddefc
+MISC ChangeLog-2015 5195 SHA256 7f7a9c2ebf1ad037405b514632e45b679d2c1a73ba3b887d9e568912825e5a61 SHA512 5de3d9f510baa1f6b4beeedce1132d4636ed02b78fc8adcf8fb00f8db20feda7b01ec9fc6bb475bc2d12092bbe5b93329f6af7dd5886e8d38b06f5bb3bf49bf5 WHIRLPOOL b5ae4c979a4c1a4d4072adb74a9fe3c887174eeba0d9b1a0854f6f3fc786464006e4d775a42c63058a030837737fb95da0fe388da23c1f6e57955c03427474c5
+MISC metadata.xml 380 SHA256 f1d9ff0aee8444270563c08e40b71fba614c3a44fe1d775c45fd6a9213836fa8 SHA512 98ca8c63733123ae6a1d1c8b338d5f98a679b8f84b1e0abed8dc7fefa5549735a7f4de9a5851a26507a6169336fa46689616e46a49df0e9a52f6efb669eac865 WHIRLPOOL 35d626381157e48343305c18f7ba680085990782b51785a0effddaf3a767305e65a12c935604855a60fb3bccddf1a21d0d8b63353b268ed0ef40adf6a2570b0d
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..6868fa409247
--- /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 ~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
+}