[arch-commits] Commit in python-hunter/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Tue Jul 24 17:53:17 UTC 2018
Date: Tuesday, July 24, 2018 @ 17:53:17
Author: felixonmars
Revision: 363308
archrelease: copy trunk to community-staging-x86_64
Added:
python-hunter/repos/community-staging-x86_64/
python-hunter/repos/community-staging-x86_64/PKGBUILD
(from rev 363307, python-hunter/trunk/PKGBUILD)
----------+
PKGBUILD | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
Copied: python-hunter/repos/community-staging-x86_64/PKGBUILD (from rev 363307, python-hunter/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2018-07-24 17:53:17 UTC (rev 363308)
@@ -0,0 +1,75 @@
+# $Id: PKGBUILD 141472 2015-09-22 16:00:29Z fyan $
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-hunter
+pkgname=('python-hunter' 'python2-hunter')
+pkgver=2.0.2
+pkgrel=2
+arch=('x86_64')
+pkgdesc='Hunter is a flexible code tracing toolkit'
+license=('BSD')
+url='https://github.com/ionelmc/python-hunter'
+makedepends=('python-setuptools' 'python2-setuptools' 'python-fields' 'python2-fields'
+ 'python-colorama' 'python2-colorama' 'python-six' 'python2-six' 'cython' 'cython2')
+checkdepends=('python-pytest-benchmark' 'python2-pytest-benchmark' 'python-virtualenv'
+ 'python2-virtualenv' 'python-pytest-runner' 'python2-pytest-runner' 'gdb'
+ 'python-manhole' 'python2-manhole' 'python-process-tests' 'python2-process-tests')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/ionelmc/python-hunter/archive/v$pkgver.tar.gz")
+sha512sums=('e0f6ea2e19f389228e00e5e3c31f6477ab5d9776ae31b68bcd686a96fb5c4bce2c41643695e67c3d2cec9837e0f4e0e8898b513310deaf8ddc8e7b56ad0475a2')
+
+prepare() {
+ sed -i "s|'-mtarget'|'tests/target.py'|" python-hunter-$pkgver/tests/test_remote.py
+ sed -i -e 's|exc_|curexc_|g' -e 's|curcurexc|curexc|g' python-hunter-$pkgver/src/hunter/{_predicates.c,_event.c}
+ cp -a python-hunter-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/python-hunter-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/python-hunter-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ # Hack to process .pth files properly
+ # ptrace needed to pass the remote tests
+
+ cd "$srcdir"/python-hunter-$pkgver
+ virtualenv "$srcdir/pyvenv" --system-site-packages
+ (
+ . "$srcdir/pyvenv/bin/activate"
+ python setup.py install
+ python setup.py pytest
+ ) || warning "Tests failed"
+
+ cd "$srcdir"/python-hunter-$pkgver-py2
+ virtualenv2 "$srcdir/pyvenv-py2" --system-site-packages
+ (
+ . "$srcdir/pyvenv-py2/bin/activate"
+ python2 setup.py install
+ python2 setup.py pytest
+ ) || warning "Tests failed"
+}
+
+package_python-hunter() {
+ depends=('python-fields' 'python-colorama' 'python-six')
+ optdepends=('python-manhole: for remote support'
+ 'gdb: for remote support')
+
+ cd python-hunter-$pkgver
+ python setup.py install --root "$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-hunter() {
+ depends=('python2-fields' 'python2-colorama' 'python2-six')
+ optdepends=('python2-manhole: for remote support'
+ 'gdb: for remote support')
+
+ cd python-hunter-$pkgver-py2
+ python2 setup.py install --root "$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+ mv "$pkgdir"/usr/bin/hunter-trace{,2}
+}
More information about the arch-commits
mailing list