archrelease: copy trunk to extra-x86_64
[arch-packages.git] / python-pyelftools / trunk / PKGBUILD
blob3a48caea6996763594884dd0410531647cacb82b
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
4 pkgname=python-pyelftools
5 _pkgname=pyelftools
6 pkgver=0.29
7 pkgrel=2
8 pkgdesc='Python library for analyzing ELF files and DWARF debugging information'
9 url='https://github.com/eliben/pyelftools'
10 arch=('any')
11 license=('custom:Public Domain')
12 depends=('python')
13 makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
14 options=('!strip')
15 source=(https://github.com/eliben/${_pkgname}/archive/v${pkgver}/${_pkgname}-${pkgver}.tar.gz)
16 sha512sums=('0eba3b029a734abe9f8df92cd58bc967f10bf9f61c3a419bdbc5e637200844dddd947bcb485e8ebbe2eeaa7f7e91efc6500316af51aace1db051a658cf61153e')
17 b2sums=('441260492f8cd512445249700a79f1d823ef96f6213ab9183e17160b76efe51493c28d2ae8ecea79acf45e78987b4c24940441e9bc0a3deaeda0ee4fb72b58c3')
20 build() {
21   cd ${_pkgname}-${pkgver}
22   python -m build --wheel --no-isolation
25 check() {
26   cd ${_pkgname}-${pkgver}
27   python test/run_all_unittests.py
28   python test/run_examples_test.py
29   if [ "${CARCH}" == "x86_64" ]; then
30     python test/run_readelf_tests.py
31   else
32     echo "Skipping readelf tests (require x86_64)"
33   fi
36 package() {
37   cd ${_pkgname}-${pkgver}
38   python -m installer --destdir="${pkgdir}" dist/*.whl
39   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
40   install -Dm 644 README.rst CHANGES -t "${pkgdir}/usr/share/doc/${pkgname}"
41   cp -r examples "${pkgdir}/usr/share/doc/${pkgname}"