[arch-commits] Commit in (4 files)

Levente Polyak anthraxx at archlinux.org
Tue Sep 19 10:50:39 UTC 2017


    Date: Tuesday, September 19, 2017 @ 10:50:38
  Author: anthraxx
Revision: 258831

addpkg: python-ptrace 0.9.2-2

Added:
  python-ptrace/
  python-ptrace/repos/
  python-ptrace/trunk/
  python-ptrace/trunk/PKGBUILD

----------+
 PKGBUILD |   68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

Added: python-ptrace/trunk/PKGBUILD
===================================================================
--- python-ptrace/trunk/PKGBUILD	                        (rev 0)
+++ python-ptrace/trunk/PKGBUILD	2017-09-19 10:50:38 UTC (rev 258831)
@@ -0,0 +1,68 @@
+# Maintainer: Muflone http://www.muflone.com/contacts/english/
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Sebastien Binet <binet at lblbox>
+
+pkgbase=python-ptrace
+pkgname=('python-ptrace' 'python2-ptrace')
+pkgver=0.9.2
+pkgrel=2
+pkgdesc='Python binding of ptrace library to trace processes and syscalls'
+url='https://github.com/haypo/python-ptrace'
+arch=('any')
+license=('GPL2')
+makedepends=('python' 'python-sphinx'
+             'python2' 'python2-sphinx')
+source=(https://github.com/haypo/python-ptrace/archive/python-ptrace-${pkgver}.tar.gz)
+sha256sums=('e4f6cac3a71d9e99e7ae96c4286899c7d45c7b9f01dbb6cef179a187b8432d3e')
+
+prepare(){
+  (cd ${pkgbase}-${pkgbase}-${pkgver}
+    sed -r 's|(\^open)|\1(at)?|g' -i tests/test_strace.py
+  )
+  cp -a ${pkgbase}-${pkgbase}-${pkgver}{,-py2}
+}
+
+build() {
+  msg "Building python..."
+  cd "${srcdir}/${pkgbase}-${pkgbase}-${pkgver}"
+  python setup.py build
+  make -j1 -C doc man text SPHINXBUILD=sphinx-build
+
+  msg "Building python2..."
+  cd "${srcdir}/${pkgbase}-${pkgbase}-${pkgver}-py2"
+  python2 setup.py build
+  make -j1 -C doc man text SPHINXBUILD=sphinx-build2
+}
+
+check() {
+  msg "Checking python..."
+  cd "${srcdir}/${pkgbase}-${pkgbase}-${pkgver}"
+  python runtests.py
+
+  msg "Checking python2..."
+  cd "${srcdir}/${pkgbase}-${pkgbase}-${pkgver}-py2"
+  python2 runtests.py
+}
+
+package_python-ptrace() {
+  depends=('python')
+  cd "${srcdir}/${pkgbase}-${pkgbase}-${pkgver}"
+  python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
+  install -Dm 644 doc/build/text/*.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
+  cp -a examples "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 doc/build/man/${pkgbase}.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+}
+
+package_python2-ptrace() {
+  depends=('python2')
+  cd "${srcdir}/${pkgbase}-${pkgbase}-${pkgver}-py2"
+  python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
+  install -Dm 644 doc/build/text/*.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
+  cp -a examples "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 doc/build/man/${pkgbase}.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+  # Rename gdb and strace scripts to avoid names conflict
+  mv "${pkgdir}/usr/bin/gdb.py" "${pkgdir}/usr/bin/gdb2.py"
+  mv "${pkgdir}/usr/bin/strace.py" "${pkgdir}/usr/bin/strace2.py"
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list