# Description: Python library for analyzing ELF files and DWARF debugging information # URL: https://github.com/eliben/pyelftools # Maintainer: Erich Eckner, crux at eckner dot net # Depends on: python3-build python3-installer python3-wheel python3-setuptools name=python3-pyelftools version=0.29 release=1 source=("https://github.com/eliben/pyelftools/archive/v${version}/pyelftools-${version}.tar.gz") build() { cd pyelftools-${version} find * -type f -name '*.py' -exec sed -i 's@^#!/usr/bin/env python$@\03@' {} + python3 -m build --wheel --no-isolation python3 test/run_all_unittests.py python3 test/run_examples_test.py python3 test/run_readelf_tests.py python3 -m installer --destdir="${PKG}" dist/*.whl install -Dm 644 LICENSE -t "${PKG}/usr/share/licenses/${name}" install -Dm 644 README.rst CHANGES -t "${PKG}/usr/share/doc/${name}" cp -r examples "${PKG}/usr/share/doc/${name}" }