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

Felix Yan fyan at archlinux.org
Sat Nov 1 14:59:10 UTC 2014


    Date: Saturday, November 1, 2014 @ 15:59:09
  Author: fyan
Revision: 121649

upgpkg: shadowsocks 2.4-1

- uses python 3 instead of python 2

Modified:
  shadowsocks/trunk/PKGBUILD

----------+
 PKGBUILD |   41 +++++++++++++++++------------------------
 1 file changed, 17 insertions(+), 24 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-11-01 14:03:44 UTC (rev 121648)
+++ PKGBUILD	2014-11-01 14:59:09 UTC (rev 121649)
@@ -2,16 +2,15 @@
 # Maintainer: Felix Yan <felixonmars at archlinux.org>
 
 pkgname=shadowsocks
-pkgver=2.3.2
+pkgver=2.4
 pkgrel=1
 pkgdesc="A lightweight tunnel proxy"
 license=("MIT")
 url="http://pypi.python.org/pypi/shadowsocks"
-depends=('python2' 'python2-setuptools')
-checkdepends=('python2-m2crypto' 'python2-salsa20')
-optdepends=('python2-m2crypto: For any encryption method other than "table"'
-            'python2-numpy: For salsa20 support'
-            'python2-salsa20: For salsa20 support')
+depends=('python' 'python-setuptools')
+checkdepends=('python-salsa20')
+optdepends=('python-numpy: For salsa20 support'
+            'python-salsa20: For salsa20 support')
 source=("http://pypi.python.org/packages/source/s/shadowsocks/shadowsocks-${pkgver}.tar.gz"
         "$pkgname-LICENSE::https://raw.github.com/clowwindy/shadowsocks/master/LICENSE"
         "shadowsocks at .service"
@@ -19,32 +18,26 @@
 arch=('any')
 install=${pkgname}.install
 
-prepare() {
-  cd shadowsocks-$pkgver/shadowsocks
-  # python2 fix
-  sed -e 's_#!/usr/bin/env python$_#!/usr/bin/env python2_' \
-      -e 's_#!/usr/bin/python$_#!/usr/bin/python2_' \
-      -i local.py server.py encrypt.py __init__.py utils.py
-}
-
 check() {
   cd shadowsocks-$pkgver
 
   # Tests not included
   return
-  python2 tests/test.py -c tests/table.json
-  python2 tests/test.py -c tests/aes.json
-  python2 tests/test.py -c tests/rc4-md5.json
-  python2 tests/test.py -c tests/salsa20.json
-  python2 tests/test.py -c tests/server-multi-ports.json
-  python2 tests/test.py -c tests/server-multi-passwd.json
-  python2 tests/test.py -c tests/server-multi-passwd-table.json
-  python2 tests/test.py -c tests/workers.json
+  python tests/test.py -c tests/table.json
+  python tests/test.py -c tests/aes.json
+  python tests/test.py -c tests/rc4-md5.json
+  python tests/test.py -c tests/salsa20.json
+  python tests/test.py -c tests/server-multi-ports.json
+  python tests/test.py -c tests/server-multi-passwd.json
+  python tests/test.py -c tests/server-multi-passwd-table.json
+  python tests/test.py -c tests/workers.json
 }
 
 package() {
   cd "$srcdir/shadowsocks-$pkgver"
-  python2 setup.py install -O1 --root="$pkgdir"
+
+  # 2.4: Setting LANG as a workaround for https://github.com/clowwindy/shadowsocks/pull/203
+  LANG=en_US.utf8 python setup.py install -O1 --root="$pkgdir"
   
   install -d "$pkgdir/etc/shadowsocks"
   install -Dm644 "$srcdir/shadowsocks at .service" "$pkgdir/usr/lib/systemd/system/shadowsocks at .service"
@@ -52,7 +45,7 @@
   install -Dm644 "$srcdir/$pkgname-LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 
-sha512sums=('54d474b898533214466eff935a636c9ceb7414a338eee8288b13f8d85519a61a5825c4be113cd3eb670fcfe5b4aa6fce0423bc72f892e1fdce9158e190738431'
+sha512sums=('b50c27202170bbacb87c7578588756a6c9d612981ff31a494d2e6e3cb56ea229e378a95c99915c2d88d987876ba752807e53c8da5cc84b937bef2a453f0dadb0'
             '88abf42d51d7b7baa2b9cef016bfd194373fd178980c2c6f1bbb3ce31d3267dfca71efb013c6596c57c0390fdb95d716ff4acca97bdf960e56e9edf16f770352'
             '96ecb174a476f64dec3ec086732d93a76d27e9a1cc56b1dc3fa87bf8e00d4b3c44076a01a0d525e42174cacc58fd5c16d5c8af5d4636dae13df549dec8204f7d'
             'f2f8240c18a4483bf3e03b3a5ac8822c3deae713224f732bf28f7fddfcc5d0b02aa91652665ff93f05731e162a9407109c18f43d732a3a9b19d9eacfc806a4df')


More information about the arch-commits mailing list