diff options
Diffstat (limited to 'dev-python/pycparser')
-rw-r--r-- | dev-python/pycparser/Manifest | 4 | ||||
-rw-r--r-- | dev-python/pycparser/pycparser-2.19-r1.ebuild | 56 | ||||
-rw-r--r-- | dev-python/pycparser/pycparser-2.20.ebuild | 17 |
3 files changed, 15 insertions, 62 deletions
diff --git a/dev-python/pycparser/Manifest b/dev-python/pycparser/Manifest index 639f1cefec1b..4335550d586a 100644 --- a/dev-python/pycparser/Manifest +++ b/dev-python/pycparser/Manifest @@ -1,5 +1,3 @@ -DIST pycparser-2.19.tar.gz 158295 BLAKE2B 8836914e7549517f0c23a1c75457beefd013161f19c51a9f2a236ebd69466edd11235bf0a3f59c5cbece9e9e287eeb24b707bfa5afc30fcb079d134dcd4d9a80 SHA512 7f830e1c9066ee2d297a55e2bf6db4bf6447b6d9da0145d11a88c3bb98505755fb7986eafa6e06ae0b7680838f5e5d6a6d188245ca5ad45c2a727587bac93ab5 DIST pycparser-2.20.tar.gz 161330 BLAKE2B 9a114e4b73e6c3c495bd78c393957146ec425eb5b15d72266cbf424f15e8d2e2e6402ef36d60a9dff41b393aab80fe1356befd25549517f398e129836a76b037 SHA512 ff0853c9f981b43b4f2e879350715c07b02cf9dab223d4980d8fe0a3138c98041b5f848a9355ae4f1cb45e7f137c03a88843008e18d77af9250e0d9c55f5ca1b -EBUILD pycparser-2.19-r1.ebuild 1624 BLAKE2B a1bfd54b4fe8fe92eb53c422180422da544bdac82edb5c191a1bc684bd6570d5b0b1af95b28a14d3ed9719542702c98df152da43864694fc3b61b1bdcba5b938 SHA512 dec9db6002d6fb613a20f56dd37d7e0b3858b33fa99ad839f99ba3ce6add861366d1bc6762b1a42b97aa26eddccffdcb2f303cd5e333d75e3b7a3b5ef92b6abb -EBUILD pycparser-2.20.ebuild 1611 BLAKE2B ec1d35bb62031d8e7f9b902653bac95bc3bdfd00ca9190cd9489a2d5b855984fda82a76a92bcc2fde7ef3bb0af4138e7479c696a2b520d7eb55a20a77ca4121e SHA512 04571ae58328b1588552fff3823ff2000da60a6fd7902555f3e7d2c5c4143c1d115517acb9f117566cfb51cbccb70eda1ee59e69a6fa8dede06ff214fa0202eb +EBUILD pycparser-2.20.ebuild 1885 BLAKE2B 905f59a68a8c9f98716a34040de4f43094538177b13bc45e14191841fe78ff3f8bb2f8b84974d275aef49c3a87c40c39693527e4de16c7bcdfacc3c346db59f0 SHA512 6ac245ddc31f4e37e7865dbc460ac3ef5c6f8c0f89df375b35d9088ec3589318eb38ba8632efd2c228b95b4fd134b3234235d932666b10716f263f5578e59a43 MISC metadata.xml 380 BLAKE2B b013fa2cb5c61b39b122c1c051ce40a8c002d4d4c6995ab78e0f3a35cec07d2f81cb5b05326ddac9c2526eb3ebcf90bc2660f588c4ebe5bacbd1a861fcf91985 SHA512 98ca8c63733123ae6a1d1c8b338d5f98a679b8f84b1e0abed8dc7fefa5549735a7f4de9a5851a26507a6169336fa46689616e46a49df0e9a52f6efb669eac865 diff --git a/dev-python/pycparser/pycparser-2.19-r1.ebuild b/dev-python/pycparser/pycparser-2.19-r1.ebuild deleted file mode 100644 index 758ae67d8282..000000000000 --- a/dev-python/pycparser/pycparser-2.19-r1.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 python3_{6,7,8} 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 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="test" -RESTRICT="!test? ( test )" - -RDEPEND="dev-python/ply:=[${PYTHON_USEDEP}]" -DEPEND="${RDEPEND} - dev-python/setuptools[${PYTHON_USEDEP}] - test? ( dev-python/nose[${PYTHON_USEDEP}] )" - -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 -} - -python_install() { - distutils-r1_python_install - - # setup.py generates {c_ast,lextab,yacctab}.py with bytecode disabled. - python_optimize -} diff --git a/dev-python/pycparser/pycparser-2.20.ebuild b/dev-python/pycparser/pycparser-2.20.ebuild index 7f1f79c16a8e..4227f14e0bf5 100644 --- a/dev-python/pycparser/pycparser-2.20.ebuild +++ b/dev-python/pycparser/pycparser-2.20.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 ) -inherit distutils-r1 +inherit distutils-r1 toolchain-funcs DESCRIPTION="C parser and AST generator written in Python" HOMEPAGE="https://github.com/eliben/pycparser" @@ -13,7 +13,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 ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" RDEPEND="dev-python/ply:=[${PYTHON_USEDEP}]" BDEPEND="${RDEPEND} @@ -41,9 +41,20 @@ python_compile() { } python_test() { + # Trick the tests into using CPP variable + # https://bugs.gentoo.org/719934 + local CPP="$(tc-getCPP)" + mkdir -p "${T}"/bin || die + cat > "${T}"/bin/cpp <<-EOF || die + #!/bin/sh + exec ${CPP} "\$@" + EOF + chmod +x "${T}"/bin/cpp || die + local -x PATH="${T}/bin:${PATH}" + # change workdir to avoid '.' import cd tests || die - "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}" + ${EPYTHON} -m unittest discover -v || die "Tests fail with ${EPYTHON}" } python_install() { |