Date: Sunday, February 17, 2019 @ 17:06:30 Author: dvzrv Revision: 434135
upgpkg: python-ethtool 0.14-2 Switching to pythonhosted.org as upstream. Removing python2 compatibility. Modified: python-ethtool/trunk/PKGBUILD ----------+ PKGBUILD | 48 ++++++++++++------------------------------------ 1 file changed, 12 insertions(+), 36 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-02-17 17:06:03 UTC (rev 434134) +++ PKGBUILD 2019-02-17 17:06:30 UTC (rev 434135) @@ -1,49 +1,40 @@ # Maintainer: David Runge <[email protected]> # Contributor: Konstantin Shalygin <[email protected]> -pkgbase=python-ethtool -pkgname=('python-ethtool' 'python2-ethtool') +_name=ethtool +pkgname=python-ethtool pkgver=0.14 -pkgrel=1 +pkgrel=2 pkgdesc='Python bindings for the ethtool kernel interface.' arch=('x86_64') url="https://github.com/fedora-python/python-ethtool" license=('GPL') -makedepends=('asciidoc' 'libnl' 'python-setuptools' 'python2-setuptools') -checkdepends=('net-tools' 'python-pytest' 'python2-pytest') -source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/fedora-python/${pkgbase}/archive/v${pkgver}.tar.gz") -sha512sums=('57a3f2d60dd8309192fc858614645d4e7533c90c03113ffc1eeeb810b86eb71b0a80b4eb209d3452c7624c5318a853de50d9d716d41334bf079e6e3e2490fd4b') +depends=('python' 'libnl') +makedepends=('asciidoc' 'libnl' 'python-setuptools') +checkdepends=('net-tools' 'python-pytest') +source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz") +sha512sums=('1b211527cab50d012312476171897beed0885d5a37e5713e5ac2e9a57fcbf67b8e0983160d0f13da8804b04738f60095bef21ab127651cb87b4f0629bb89ccf7') build() { - cd "${pkgbase}-${pkgver}" + cd "${_name}-${pkgver}" python setup.py build a2x -d manpage -f manpage "man/pethtool.8.asciidoc" a2x -d manpage -f manpage "man/pifconfig.8.asciidoc" - python2 setup.py build - cp -v man/pethtool.8 man/pethtool2.8 - cp -v man/pifconfig.8 man/pifconfig2.8 } # do not run flaky tests: # https://github.com/fedora-python/python-ethtool/issues/40 check() { - cd "${pkgbase}-${pkgver}" + cd "${_name}-${pkgver}" local _py3_ver=$(python --version | cut -d " " -f2) export PYTHONPATH="build/lib.linux-$CARCH-${_py3_ver%"."*}:${PYTHONPATH}" py.test -k 'not test_etherinfo_objects \ and not test_get_interface_info_active \ and not test_get_interface_info_all' - export PYTHONPATH="build/lib.linux-$CARCH-2.7:${PYTHONPATH}" - py.test2 -k 'not test_etherinfo_objects \ - and not test_get_interface_info_active \ - and not test_get_interface_info_all' -# python setup.py test -# python2 setup.py test } -package_python-ethtool() { - depends=('python' 'libnl') - cd "${pkgbase}-${pkgver}" +package() { + cd "${_name}-${pkgver}" python setup.py install --skip-build \ --optimize=1 \ --prefix=/usr \ @@ -52,18 +43,3 @@ install -t "${pkgdir}/usr/share/man/man8" \ -vDm 644 man/{pethtool,pifconfig}.8 } - -package_python2-ethtool() { - depends=('python2' 'libnl') - cd "${pkgbase}-${pkgver}" - python2 setup.py install --skip-build \ - --optimize=1 \ - --prefix=/usr \ - --root="${pkgdir}" - - mv -v "${pkgdir}/usr/bin/pethtool" "${pkgdir}/usr/bin/pethtool2" - mv -v "${pkgdir}/usr/bin/pifconfig" "${pkgdir}/usr/bin/pifconfig2" - install -t "${pkgdir}/usr/share/man/man8" \ - -vDm 644 man/{pethtool,pifconfig}2.8 -} -
