[arch-commits] Commit in python-vmprof/repos (3 files)

Felix Yan felixonmars at archlinux.org
Sun Nov 15 16:39:11 UTC 2020


    Date: Sunday, November 15, 2020 @ 16:39:10
  Author: felixonmars
Revision: 754589

archrelease: copy trunk to community-staging-x86_64

Added:
  python-vmprof/repos/community-staging-x86_64/
  python-vmprof/repos/community-staging-x86_64/PKGBUILD
    (from rev 754588, python-vmprof/trunk/PKGBUILD)
  python-vmprof/repos/community-staging-x86_64/python-vmprof-0.4.15-pep479.patch
    (from rev 754588, python-vmprof/trunk/python-vmprof-0.4.15-pep479.patch)

-----------------------------------+
 PKGBUILD                          |   57 ++++++++++++++++++++++++++++++++++++
 python-vmprof-0.4.15-pep479.patch |   20 ++++++++++++
 2 files changed, 77 insertions(+)

Copied: python-vmprof/repos/community-staging-x86_64/PKGBUILD (from rev 754588, python-vmprof/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-11-15 16:39:10 UTC (rev 754589)
@@ -0,0 +1,57 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=vmprof
+pkgname=python-vmprof
+pkgver=0.4.15
+pkgrel=3
+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"
+        "${pkgname}-${pkgver}-gcc10.patch::https://github.com/vmprof/vmprof-python/commit/854191e03004.patch"
+        "${pkgname}-${pkgver}-pep479.patch")
+sha512sums=('1815e3310ea83b241514e7773d89f8ee40425119dc7ba195d1fb513596bd63d64ad5d50b0dc0c33e10157469d2d772c5d6435362042971167238ac86f1689b01'
+            'fe6eba8adb47c66f4c67d6559a83222e07fde23c75e732961e5e4370dea3fcfbcd1b81522adb37a321e92ba6ad87c58e887e20511c81e20669f39e6e1de87e30'
+            'ea085605b70a5cbf3629f5da0401747f1082bd7be3dda21ba036d7444cf48cebd3ad79312d70cd2daff652222f52201d4a4aee40c8c10fd15b7a4bb6ec03aa73')
+
+prepare() {
+  mv -v "${_name}-python-$pkgver" "$pkgname-$pkgver"
+  cd "$pkgname-$pkgver"
+  # https://github.com/vmprof/vmprof-python/pull/203
+  patch -Np1 -i ../"${pkgname}-${pkgver}-gcc10.patch"
+  # fixing PEP479 problems:
+  # https://github.com/vmprof/vmprof-python/issues/188
+  patch -Np1 -i ../"${pkgname}-${pkgver}-pep479.patch"
+  # fixing TestNative tests:
+  # https://github.com/vmprof/vmprof-python/issues/216
+  sed -i 's/-Werror/-w/g' vmprof/test/*
+}
+
+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}"
+  pytest -v vmprof/test
+}
+
+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}"
+}

Copied: python-vmprof/repos/community-staging-x86_64/python-vmprof-0.4.15-pep479.patch (from rev 754588, python-vmprof/trunk/python-vmprof-0.4.15-pep479.patch)
===================================================================
--- community-staging-x86_64/python-vmprof-0.4.15-pep479.patch	                        (rev 0)
+++ community-staging-x86_64/python-vmprof-0.4.15-pep479.patch	2020-11-15 16:39:10 UTC (rev 754589)
@@ -0,0 +1,20 @@
+--- a/jitlog/objects.py	2018-04-11 06:52:06.000000000 -0700
++++ b/jitlog/objects.py	2019-01-07 20:57:05.348638044 -0800
+@@ -371,7 +371,7 @@
+ 
+ def iter_ranges(numbers):
+     if len(numbers) == 0:
+-        raise StopIteration
++        return
+     numbers.sort()
+     first = numbers[0]
+     last = numbers[0]
+@@ -382,7 +382,7 @@
+                 last = i
+                 first = i
+             else:
+-                raise StopIteration
++                return
+         else:
+             last = i
+     yield range(first, last+1)



More information about the arch-commits mailing list