[arch-commits] Commit in python-pysocks/repos (2 files)
Bartłomiej Piotrowski
bpiotrowski at archlinux.org
Sat Dec 24 17:56:26 UTC 2016
Date: Saturday, December 24, 2016 @ 17:56:26
Author: bpiotrowski
Revision: 201713
archrelease: copy trunk to community-staging-any
Added:
python-pysocks/repos/community-staging-any/
python-pysocks/repos/community-staging-any/PKGBUILD
(from rev 201711, python-pysocks/trunk/PKGBUILD)
----------+
PKGBUILD | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
Copied: python-pysocks/repos/community-staging-any/PKGBUILD (from rev 201711, python-pysocks/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2016-12-24 17:56:26 UTC (rev 201713)
@@ -0,0 +1,64 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Michael Schubert <mschu.dev at gmail>
+
+pkgbase=python-pysocks
+pkgname=(python-pysocks python2-pysocks)
+pkgver=1.6.5
+pkgrel=2
+pkgdesc="SOCKS4, SOCKS5 or HTTP proxy (Anorov fork PySocks replaces socksipy)"
+arch=('any')
+license=('BSD')
+url="https://github.com/Anorov/PySocks"
+makedepends=('python' 'python2' 'git')
+checkdepends=('lib32-glibc' 'python2-twisted' 'python2-tornado')
+source=("git+https://github.com/Anorov/PySocks.git#tag=$pkgver")
+md5sums=('SKIP')
+
+prepare() {
+ cp -a PySocks{,-py2}
+}
+
+build() {
+ cd "$srcdir"/PySocks
+ python setup.py build
+
+ cd "$srcdir"/PySocks-py2
+ python2 setup.py build
+}
+
+# Tests disabled as it requires external services to run
+check_disabled() {
+ cd "$srcdir"/PySocks-py2/test
+ python2 socks4server.py &
+ _SOCKS4SERVER=$!
+ python2 httpproxy.py &
+ _HTTPPROXY=$1
+
+ ./mocks start
+
+ sleep 1
+
+ python2 sockstest.py
+
+ cd "$srcdir"/PySocks/test
+ python sockstest.py
+
+ ./mocks shutdown
+
+ kill $_SOCKS4SERVER $_HTTPPROXY
+}
+
+package_python-pysocks() {
+ depends=('python')
+
+ cd PySocks
+ python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+}
+
+package_python2-pysocks() {
+ depends=('python2')
+
+ cd PySocks-py2
+ python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+}
More information about the arch-commits
mailing list