2635223cac667aa85cbb52cf7eee5a7a6414d069
[gentoo.git] / dev-python / pyelftools / pyelftools-0.25.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{6,7,8} )
7 inherit distutils-r1
8
9 DESCRIPTION="pure-Python library for analyzing ELF files and DWARF debugging information"
10 HOMEPAGE="https://pypi.org/project/pyelftools/ https://github.com/eliben/pyelftools"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="public-domain"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux"
16 IUSE="examples"
17
18 python_test() {
19         # readelf_tests often fails due to host `readelf` changing output format
20         local t
21         for t in all_unittests examples_test ; do
22                 "${PYTHON}" ./test/run_${t}.py || die "Tests fail with ${EPYTHON}"
23         done
24 }
25
26 python_install_all() {
27         use examples && dodoc -r examples
28         distutils-r1_python_install_all
29 }