[arch-commits] Commit in python2-netlib/repos (2 files)

Felix Yan fyan at archlinux.org
Mon Feb 15 00:10:02 UTC 2016


    Date: Monday, February 15, 2016 @ 01:10:02
  Author: fyan
Revision: 161566

archrelease: copy trunk to community-staging-any

Added:
  python2-netlib/repos/community-staging-any/
  python2-netlib/repos/community-staging-any/PKGBUILD
    (from rev 161565, python2-netlib/trunk/PKGBUILD)

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

Copied: python2-netlib/repos/community-staging-any/PKGBUILD (from rev 161565, python2-netlib/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2016-02-15 00:10:02 UTC (rev 161566)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Nicolas Pouillard https://nicolaspouillard.fr
+
+pkgname=python2-netlib
+pkgver=0.16
+pkgrel=1
+pkgdesc="A collection of network utilities used by pathod and mitmproxy"
+url="https://github.com/mitmproxy/netlib"
+license=('MIT')
+arch=('any')
+depends=('python2-passlib' 'python2-pyasn1' 'python2-pyopenssl' 'python2-hpack' 'python2-hyperframe' 'python2-six')
+makedepends=('python2-setuptools')
+checkdepends=('python2-mock' 'python2-pytest-runner')
+source=("http://pypi.python.org/packages/source/n/netlib/netlib-$pkgver.tar.gz")
+sha256sums=('c70ed1915a5662c9ffce4dc97d143209e009cf0035a2f692031a6c47e87e6002')
+
+prepare() {
+  cd netlib-$pkgver
+
+  # Use system certificate store, and system ssl.match_hostname
+  sed -e '/certifi/d' \
+      -e '/backports.ssl_match_hostname/d' \
+      -i setup.py
+  sed -e '/import certifi/d' \
+      -e 's|certifi.where()|"/etc/ssl/certs/ca-certificates.crt"|' \
+      -e 's/from backports import ssl_match_hostname/import ssl as ssl_match_hostname/' \
+      -i netlib/tcp.py
+}  
+
+build() {
+  cd "$srcdir/netlib-$pkgver"
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir/netlib-$pkgver"
+  python2 setup.py ptr
+}
+
+package() {
+  cd "$srcdir/netlib-$pkgver"
+  python2 setup.py install -O1 --skip-build --root="$pkgdir"
+
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}



More information about the arch-commits mailing list