[arch-commits] Commit in (4 files)

Thore Bödecker foxxx0 at archlinux.org
Thu Jun 27 16:33:00 UTC 2019


    Date: Thursday, June 27, 2019 @ 16:33:00
  Author: foxxx0
Revision: 484970

initial version for our repo

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

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

Added: python-pyroute2/trunk/PKGBUILD
===================================================================
--- python-pyroute2/trunk/PKGBUILD	                        (rev 0)
+++ python-pyroute2/trunk/PKGBUILD	2019-06-27 16:33:00 UTC (rev 484970)
@@ -0,0 +1,56 @@
+# Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
+# Contributor: brent s. <bts[at]square-r00t[dot]net>
+# Contributor: Alexander Phinikarides <alexisph _AT_ gmail _DOT_ com>
+
+pkgbase='python-pyroute2'
+_pkgbase="${pkgbase//python-/}"
+pkgname=("python-${_pkgbase}" "python2-${_pkgbase}")
+pkgdesc="A pure Python netlink and Linux network configuration library"
+pkgver=0.5.6
+pkgrel=1
+arch=('any')
+url="https://docs.pyroute2.org/"
+license=('GPL2' 'Apache')
+makedepends=('python' 'python2' 'python-setuptools' 'python2-setuptools')
+source=("https://files.pythonhosted.org/packages/source/${_pkgbase:0:1}/${_pkgbase}/${_pkgbase}-${pkgver}.tar.gz")
+sha512sums=('68df5ebd715136ab68b26c96ceacea0a4b837754719c133457898af17660593f9a29703a6c119748f668fb8997400546c11ed30e90ddbb468bb9f99a910d2c21')
+
+prepare() {
+  cp -r "${srcdir}/${_pkgbase}-${pkgver}" "${srcdir}/${_pkgbase}-${pkgver}-py2"
+}
+
+build() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  python setup.py build
+
+  cd "${srcdir}/${_pkgbase}-${pkgver}-py2"
+  python2 setup.py build
+}
+
+check() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  python setup.py check
+
+  cd "${srcdir}/${_pkgbase}-${pkgver}-py2"
+  python2 setup.py check
+}
+
+package_python-pyroute2() {
+  depends=('python')
+
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  python setup.py install --root="$pkgdir/" --optimize=1
+}
+
+package_python2-pyroute2() {
+  depends=('python2')
+
+  cd "${srcdir}/${_pkgbase}-${pkgver}-py2"
+  python2 setup.py install --root="$pkgdir/" --optimize=1
+
+  # those are conflicting, if you actually need the command line utils
+  # use the py3 package to obtain them
+  rm -f "${pkgdir}"/usr/bin/{pyroute2-cli,ss2}
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list