diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-02-23 21:45:48 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-02-23 21:45:48 +0000 |
commit | 0530006d7f63d6c158b4ff5ea0c3f7ef3bae9cc4 (patch) | |
tree | b3f2e1932614978a64f3fff0cf39d188bcb8a4d3 /dev-python/pycparser | |
parent | 9217a0cce81e89f5648599fcda4e549903c7b9bd (diff) |
gentoo auto-resync : 23:02:2023 - 21:45:48
Diffstat (limited to 'dev-python/pycparser')
-rw-r--r-- | dev-python/pycparser/Manifest | 3 | ||||
-rw-r--r-- | dev-python/pycparser/pycparser-2.21-r1.ebuild | 3 | ||||
-rw-r--r-- | dev-python/pycparser/pycparser-2.21-r2.ebuild | 69 |
3 files changed, 71 insertions, 4 deletions
diff --git a/dev-python/pycparser/Manifest b/dev-python/pycparser/Manifest index 669049e41202..39170fc4734b 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-r1.ebuild 1813 BLAKE2B f009abed1128e42cb7e6e6ce61e12e3a39d806c2eaddff92d37698435b1c9a053a93aca15da21224405267533e9aa789114fa2eed364fa20e870e0709883f13c SHA512 c4e87cc3402b05f425a70feb709b8727c7d602eba07d42d2d2670d646b7c6f01794b639d95e5ee16c11dd1b2af9a8aab37abb47fe527a4a31179fe2a945d07e3 +EBUILD pycparser-2.21-r1.ebuild 1779 BLAKE2B fbdd2c5116a1426ddd942c29f0ddb391dfbbcbaa7a8fcf1475cf9a386fd4c919efc2120665a2cef46ba5d54d6cd4c204826d58c467e44b5c1ae289182ee117f0 SHA512 f0313b385d0fc9566ca5aff66e9a626ebd714ae170228988d6ff3fa729830be5d3d27953b148de90dfda8af954ce535ae682866937c317ea9f230d75be138ad0 +EBUILD pycparser-2.21-r2.ebuild 1899 BLAKE2B 66b26e6aff00ef9cda0ca26714784e838d2fb7104cfb9d803cbeb3e0f7ab44e7af7c2bb65b9b0cb24a09521c82f4ec3103f54c0e710f9f08f38704fb4c244c84 SHA512 8030001ab674a3cb5c11b429f6294f94d6f4ac80037247c8e83815ea282f6b2f606de10308fdf94ee3eecda496191a63cc4141b5e3c8fe9da4d7a2acb65fb65b MISC metadata.xml 406 BLAKE2B 61cb250ac460c4ea05f47bd8d208e44706bc80965ca1982e490d759d3a63652e5e13bf357532afb599ecea491f3c9a4cd315b97250b115bb7e8fa769b2ef03ff SHA512 b2d4ffde31f97a98e4a74bdd70751519d1339bbf3384e9e671760506fc2dac9d92bf6f7a743973002b4ae6da1cd2bb11abbfe63cbb330a1c32702b3eef24a62b diff --git a/dev-python/pycparser/pycparser-2.21-r1.ebuild b/dev-python/pycparser/pycparser-2.21-r1.ebuild index 3b32ad92c905..1b0d8e6f6901 100644 --- a/dev-python/pycparser/pycparser-2.21-r1.ebuild +++ b/dev-python/pycparser/pycparser-2.21-r1.ebuild @@ -43,9 +43,6 @@ python_prepare_all() { rm tests/test_examples.py || die - # bug #701878 - MAKEOPTS+=" -j1" - distutils-r1_python_prepare_all } diff --git a/dev-python/pycparser/pycparser-2.21-r2.ebuild b/dev-python/pycparser/pycparser-2.21-r2.ebuild new file mode 100644 index 000000000000..edebc42725b5 --- /dev/null +++ b/dev-python/pycparser/pycparser-2.21-r2.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2023 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_{9..11} pypy3 ) + +inherit distutils-r1 pypi + +DESCRIPTION="C parser and AST generator written in Python" +HOMEPAGE=" + https://github.com/eliben/pycparser/ + https://pypi.org/project/pycparser/ +" + +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 + + # unbundle ply + rm -r pycparser/ply || die + sed -i -e 's:\(from \)[.]\(ply\b\):\1\2:' pycparser/*.py || die + sed -i -e "s:'pycparser.ply'::" setup.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 +} |