[arch-commits] Commit in python-netifaces/trunk (PKGBUILD)

Felix Yan fyan at archlinux.org
Fri Feb 26 06:43:22 UTC 2016


    Date: Friday, February 26, 2016 @ 07:43:22
  Author: fyan
Revision: 163471

upgpkg: python-netifaces 0.10.4-2

add a python 3 counterpart

Modified:
  python-netifaces/trunk/PKGBUILD

----------+
 PKGBUILD |   26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-02-26 06:40:14 UTC (rev 163470)
+++ PKGBUILD	2016-02-26 06:43:22 UTC (rev 163471)
@@ -3,20 +3,36 @@
 # Contributor: Gergely Imreh <imrehg(at)gmail(dot)com>
 # Contributor: Ghost of Kendo <ghostofkendo at gmail dot com>
 
-pkgname=python2-netifaces
+pkgbase=python-netifaces
+pkgname=(python-netifaces python2-netifaces)
 pkgver=0.10.4
-pkgrel=1
+pkgrel=2
 pkgdesc="Portable module to access network interface information in Python"
 arch=('i686' 'x86_64')
 url="http://alastairs-place.net/netifaces/"
 license=('MIT')
-depends=('python2')
-makedepends=('python2-distribute')
+makedepends=('python-setuptools' 'python2-setuptools')
 source=("https://pypi.python.org/packages/source/n/netifaces/netifaces-${pkgver}.tar.gz")
 md5sums=('36da76e2cfadd24cc7510c2c0012eb1e')
 
-package() {
+prepare() {
+  cp -a "${srcdir}/netifaces-${pkgver}"{,-py2}
+}
+
+package_python-netifaces() {
+  depends=('python')
+
   cd "${srcdir}/netifaces-${pkgver}"
+  python setup.py install --root "${pkgdir}"
+
+  # Install license, that is inside the readme file
+  install -Dm644 README.rst "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_python2-netifaces() {
+  depends=('python2')
+
+  cd "${srcdir}/netifaces-${pkgver}-py2"
   python2 setup.py install --root "${pkgdir}"
 
   # Install license, that is inside the readme file



More information about the arch-commits mailing list