Date: Friday, January 10, 2020 @ 19:01:07 Author: dvzrv Revision: 551784
Adding python-vmprof as optdepends for python-falcon (depends for mailman3). Added: python-vmprof/ python-vmprof/repos/ python-vmprof/trunk/ python-vmprof/trunk/PKGBUILD ----------+ PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) Added: python-vmprof/trunk/PKGBUILD =================================================================== --- python-vmprof/trunk/PKGBUILD (rev 0) +++ python-vmprof/trunk/PKGBUILD 2020-01-10 19:01:07 UTC (rev 551784) @@ -0,0 +1,47 @@ +# Maintainer: David Runge <dv...@archlinux.org> + +_name=vmprof +pkgname=python-vmprof +pkgver=0.4.15 +pkgrel=1 +pkgdesc="A statistical program profiler" +arch=('x86_64') +url="https://vmprof.com/#/" +license=('MIT') +depends=('libunwind' 'python' 'python-colorama' 'python-pytz' 'python-requests' 'python-six') +makedepends=('python-setuptools') +checkdepends=('python-cffi' 'python-hypothesis' 'python-pytest') +# tests are not available in pypi sdist +# https://github.com/vmprof/vmprof-python/issues/215 +# source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz") +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${_name}/${_name}-python/archive/${pkgver}.tar.gz") +sha512sums=('1815e3310ea83b241514e7773d89f8ee40425119dc7ba195d1fb513596bd63d64ad5d50b0dc0c33e10157469d2d772c5d6435362042971167238ac86f1689b01') + +prepare() { + mv -v "${_name}-python-$pkgver" "$pkgname-$pkgver" + cd "$pkgname-$pkgver" +} + +build() { + cd "$pkgname-$pkgver" + python setup.py build +} + +check() { + cd "$pkgname-$pkgver" + local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') + export PYTHONPATH="build/lib.linux-${CARCH}-${python_version}:${PYTHONPATH}" + # TestNative tests are failing: + # https://github.com/vmprof/vmprof-python/issues/216 + pytest -v vmprof/test -k 'not test_gzip_call and not test_is_enabled and not test_get_profile_path and not test_get_runtime' +} + +package() { + cd "$pkgname-$pkgver" + python setup.py install --skip-build \ + --optimize=1 \ + --prefix=/usr \ + --root="${pkgdir}" + install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}" +}