[arch-commits] Commit in python-pcapy/repos (2 files)

Levente Polyak anthraxx at archlinux.org
Sat Jul 7 19:31:14 UTC 2018


    Date: Saturday, July 7, 2018 @ 19:31:14
  Author: anthraxx
Revision: 354063

archrelease: copy trunk to community-staging-x86_64

Added:
  python-pcapy/repos/community-staging-x86_64/
  python-pcapy/repos/community-staging-x86_64/PKGBUILD
    (from rev 354062, python-pcapy/trunk/PKGBUILD)

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

Copied: python-pcapy/repos/community-staging-x86_64/PKGBUILD (from rev 354062, python-pcapy/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-07-07 19:31:14 UTC (rev 354063)
@@ -0,0 +1,64 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Chris Severance aur.severach AatT spamgourmet.com
+
+_pyname=pcapy
+pkgbase=python-pcapy
+pkgname=('python-pcapy' 'python2-pcapy')
+pkgver=0.11.4
+pkgrel=1
+pkgdesc='Extension module that interfaces with the libpcap packet capture library'
+url='https://github.com/CoreSecurity/pcapy'
+arch=('x86_64')
+license=('Apache')
+makedepends=('python-setuptools' 'python2-setuptools' 'libpcap')
+source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/CoreSecurity/pcapy/archive/${pkgver}.tar.gz)
+sha512sums=('58fa9d5c89e093b6a5130a9f4e37f3186c616b32608ee6e5d07b1a9206ae310bb52e03738873923b4720c47c85ec886e12275dc64fb7a8c3c2e43ffb6fa875e5')
+
+prepare() {
+  sed '/self.assertEqual(refNone, sys.getrefcount(None))/d' -i ${_pyname}-${pkgver}/tests/pcapytests.py
+  cp -ra ${_pyname}-${pkgver}{,-py2}
+}
+
+build() {
+  msg2 'Building python...'
+  (cd ${_pyname}-${pkgver}
+    python setup.py build
+  )
+  msg2 'Building python2...'
+  (cd ${_pyname}-${pkgver}-py2
+    python2 setup.py build
+  )
+}
+
+check() {
+  msg2 'Checking python...'
+  (cd ${_pyname}-${pkgver}/tests
+    local PYTHONVERSION="$(python -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')"
+    PYTHONPATH="../build/lib.linux-${CARCH}-${PYTHONVERSION}" \
+      python pcapytests.py
+  )
+  msg2 'Checking python2...'
+  (cd ${_pyname}-${pkgver}-py2/tests
+    local PYTHONVERSION="$(python2 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')"
+    PYTHONPATH="../build/lib.linux-${CARCH}-${PYTHONVERSION}" \
+      python2 pcapytests.py
+  )
+}
+
+package_python-pcapy() {
+  depends=('python' 'libpcap')
+  cd ${_pyname}-${pkgver}
+  python setup.py install -O1 --root="${pkgdir}" --skip-build
+  install -Dm 644 pcapy.html ChangeLog -t "${pkgdir}/usr/share/doc/${pkgname}"
+  rm -r "${pkgdir}/usr/share/doc/pcapy"
+}
+
+package_python2-pcapy() {
+  depends=('python2' 'libpcap')
+  cd ${_pyname}-${pkgver}-py2
+  python2 setup.py install -O1 --root="${pkgdir}" --skip-build
+  install -Dm 644 pcapy.html ChangeLog -t "${pkgdir}/usr/share/doc/${pkgname}"
+  rm -r "${pkgdir}/usr/share/doc/pcapy"
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list