[arch-commits] Commit in python-plop/repos (3 files)
Felix Yan
felixonmars at archlinux.org
Tue Jul 3 10:14:56 UTC 2018
Date: Tuesday, July 3, 2018 @ 10:14:56
Author: felixonmars
Revision: 350734
archrelease: copy trunk to community-staging-any
Added:
python-plop/repos/community-staging-any/
python-plop/repos/community-staging-any/PKGBUILD
(from rev 350733, python-plop/trunk/PKGBUILD)
python-plop/repos/community-staging-any/disable-flaky-threaded-test.patch
(from rev 350733, python-plop/trunk/disable-flaky-threaded-test.patch)
-----------------------------------+
PKGBUILD | 56 ++++++++++++++++++++++++++++++++++++
disable-flaky-threaded-test.patch | 23 ++++++++++++++
2 files changed, 79 insertions(+)
Copied: python-plop/repos/community-staging-any/PKGBUILD (from rev 350733, python-plop/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2018-07-03 10:14:56 UTC (rev 350734)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-plop
+pkgname=(python-plop python2-plop)
+pkgver=0.3.0
+pkgrel=3
+pkgdesc="Python Low-Overhead Profiler"
+arch=('any')
+license=('MIT')
+url="https://github.com/bdarnell/plop"
+makedepends=('python-tornado' 'python2-tornado' 'python-six' 'python2-six'
+ 'python-setuptools' 'python2-setuptools')
+source=("https://pypi.python.org/packages/source/p/plop/plop-${pkgver}.tar.gz"
+ disable-flaky-threaded-test.patch)
+md5sums=('4a313d6a8dd59ac48cfa3af426d197fc'
+ '1d9dc194b65a08f877506b5c5098c251')
+
+prepare() {
+ patch -d plop-$pkgver -Np1 < disable-flaky-threaded-test.patch
+ # tornado.testing.LogTrapTestCase was removed in Tornado 5.0
+ sed -i 's/LogTrapTestCase/ExpectLog/' plop-$pkgver/plop/test/callgraph_test.py
+ cp -a plop-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir/plop-${pkgver}"
+ python setup.py build
+
+ cd "$srcdir/plop-${pkgver}-py2"
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir/plop-${pkgver}"
+ python -m plop.test.runtests
+
+ cd "$srcdir/plop-${pkgver}-py2"
+ python2 -m plop.test.runtests
+}
+
+package_python-plop() {
+ depends=('python-six' 'python-tornado')
+
+ cd "${srcdir}/plop-${pkgver}"
+ python setup.py install --root="${pkgdir}" --optimize=1
+ install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+}
+
+package_python2-plop() {
+ depends=('python2-six' 'python2-tornado')
+
+ cd "${srcdir}/plop-${pkgver}-py2"
+ python2 setup.py install --root="${pkgdir}" --optimize=1
+ install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+}
Copied: python-plop/repos/community-staging-any/disable-flaky-threaded-test.patch (from rev 350733, python-plop/trunk/disable-flaky-threaded-test.patch)
===================================================================
--- community-staging-any/disable-flaky-threaded-test.patch (rev 0)
+++ community-staging-any/disable-flaky-threaded-test.patch 2018-07-03 10:14:56 UTC (rev 350734)
@@ -0,0 +1,23 @@
+From 99602f63ecabc3533439b7c8af5b09d7f793c4fb Mon Sep 17 00:00:00 2001
+From: Ben Darnell <ben at bendarnell.com>
+Date: Sat, 13 Feb 2016 19:06:05 -0500
+Subject: [PATCH] Disable flaky threaded test
+
+---
+ plop/test/collector_test.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/plop/test/collector_test.py b/plop/test/collector_test.py
+index d5e22c7..12270cb 100644
+--- a/plop/test/collector_test.py
++++ b/plop/test/collector_test.py
+@@ -76,7 +76,8 @@ def c(end):
+ time_per_sample = float(collector.sample_time) / collector.samples_taken
+ self.assertTrue(time_per_sample < 0.000100, time_per_sample)
+
+- def test_collect_threads(self):
++ # TODO: any way to make this test not flaky?
++ def disabled_test_collect_threads(self):
+ start = time.time()
+ def a(end):
+ while time.time() < end: pass
More information about the arch-commits
mailing list