summaryrefslogtreecommitdiff
path: root/dev-python/pycparser
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
committerV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
commit752d6256e5204b958b0ef7905675a940b5e9172f (patch)
tree330d16e6362a49cbed8875a777fe641a43376cd3 /dev-python/pycparser
parent0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff)
gentoo resync : 12.05.2022
Diffstat (limited to 'dev-python/pycparser')
-rw-r--r--dev-python/pycparser/Manifest3
-rw-r--r--dev-python/pycparser/pycparser-2.21-r1.ebuild65
-rw-r--r--dev-python/pycparser/pycparser-2.21.ebuild4
3 files changed, 69 insertions, 3 deletions
diff --git a/dev-python/pycparser/Manifest b/dev-python/pycparser/Manifest
index 87c9275cee42..25b7790eeede 100644
--- a/dev-python/pycparser/Manifest
+++ b/dev-python/pycparser/Manifest
@@ -1,3 +1,4 @@
DIST pycparser-2.21.tar.gz 170877 BLAKE2B ae6bf42dfc552bf1e3bfb5430cdb0c15b5e011ec53cbd03e0e2507c08a1a78690cefce2de134bd984caccc5dbde90661cb4c18df5c289217967213aac4d52404 SHA512 e61fbdde484d1cf74d4b27bdde40cf2da4b7028ca8ecd37c83d77473dab707d457321aecaf97da3b114c1d58a4eb200290b76f9c958044b57e5fed949895b5f0
-EBUILD pycparser-2.21.ebuild 2228 BLAKE2B a0e8190b8747b3abb2566c40841a7e60f699e0e348d34c6e7e75a6e741c132ab7b7f8f5614ca4d6c630fd393e74c86337fc230a31f3c5a12b90bb1c26953d64e SHA512 6bba7ed9871510ccc2f49e3346216d836a09d27fc2fe417836855de41dfdbcd5936e9034687d5ad244b36a06ce016db614262b51f0810fff8b3921ef033e762b
+EBUILD pycparser-2.21-r1.ebuild 1787 BLAKE2B 1d0134066fa9431a1604c02e1a85071e7a9fcc1dc22ffb682bd9ea2f91f50691b6417ce40bedbdea6198c498b5051bd8d07dde74a611b58082357a7ab5419432 SHA512 f26a4019b1b5625eb67cc604ff0b7749d23d2b2d835ef9d362135dcc3fe7e7439e81ba90b1cad91ab4e36b39fc9bdff173c3cab31b60032b7c7b92a055b0bf20
+EBUILD pycparser-2.21.ebuild 2235 BLAKE2B 1873c8ff3a31533402bf8ef729f3bc3fdd8e3b0cb7f9377c1da50a428988270081448c8b6be81a1a4a8b28315cc66e7a676daa3d080f9b1a000914a838b35cd6 SHA512 f36d5e8e22a3c7a3e854c41273c10dc27f2996bdbcbc948ee5d80b1db040e23a8e238ae67ad6a6b19688e915c621229ae80e3a617c2a832bbdead779402f197b
MISC metadata.xml 381 BLAKE2B ceed0b1da227f2b8016d51e7a6d6b9980d29c1dd930c9c5843c66ab62e3366f48f943bfd06155e9884fe08ab13da1844f7193a142d9d3f8f1db1a0ea5a9d3474 SHA512 e2603fae46f989057b80f13828825388f54f179b6dd9beeaad64e0eaa97ebd753e5eac752d79df460c31e9cfeb795998887964bdf92b364f5b7d7b6b2d65a21f
diff --git a/dev-python/pycparser/pycparser-2.21-r1.ebuild b/dev-python/pycparser/pycparser-2.21-r1.ebuild
new file mode 100644
index 000000000000..602a4e535710
--- /dev/null
+++ b/dev-python/pycparser/pycparser-2.21-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
+EAPI=7
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="C parser and AST generator written in Python"
+HOMEPAGE="
+ https://github.com/eliben/pycparser/
+ https://pypi.org/project/pycparser/
+"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+RDEPEND="
+ dev-python/ply:=[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ ${RDEPEND}
+"
+
+distutils_enable_tests unittest
+
+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
+
+ # Ensure we can find tests in our directory
+ sed -i -e 's/from tests.test_util/from test_util/g' tests/test_*.py || die
+
+ ln -s "${S}"/examples tests/examples || die
+
+ rm tests/test_examples.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ # Skip tests if cpp is not in PATH
+ type -P cpp >/dev/null || return 0
+ # change workdir to avoid '.' import
+ cd tests || die
+
+ # Ensure that 'cpp' is called with the right arguments
+ # Tests don't seem to always pass the include they intend to use.
+ mkdir -p "${T}"/bin || die
+ cat > "${T}"/bin/cpp <<-EOF || die
+ #!${BROOT}/bin/bash
+ exec ${BROOT}/usr/bin/cpp -I${S}/utils/fake_libc_include/ \$@
+ EOF
+ chmod +x "${T}"/bin/cpp || die
+
+ PATH="${T}/bin:${PATH}" eunittest
+}
diff --git a/dev-python/pycparser/pycparser-2.21.ebuild b/dev-python/pycparser/pycparser-2.21.ebuild
index 8ab95ab95667..c54b32f9dd37 100644
--- a/dev-python/pycparser/pycparser-2.21.ebuild
+++ b/dev-python/pycparser/pycparser-2.21.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
@@ -14,7 +14,7 @@ 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 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
RDEPEND="dev-python/ply:=[${PYTHON_USEDEP}]"
BDEPEND="${RDEPEND}