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

Felix Yan fyan at archlinux.org
Thu Apr 9 02:51:58 UTC 2015


    Date: Thursday, April 9, 2015 @ 04:51:58
  Author: fyan
Revision: 131004

upgpkg: python-pymongo 3.0-1

Modified:
  python-pymongo/trunk/PKGBUILD

----------+
 PKGBUILD |   43 ++++++++++++++++++++-----------------------
 1 file changed, 20 insertions(+), 23 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-04-09 00:06:51 UTC (rev 131003)
+++ PKGBUILD	2015-04-09 02:51:58 UTC (rev 131004)
@@ -6,8 +6,8 @@
 
 pkgbase=python-pymongo
 pkgname=('python-pymongo' 'python2-pymongo')
-pkgver=2.8
-pkgrel=3
+pkgver=3.0
+pkgrel=1
 pkgdesc='Python module for using MongoDB'
 arch=('x86_64' 'i686')
 license=('APACHE')
@@ -16,7 +16,7 @@
 checkdepends=('python-nose' 'python2-nose' 'python2-gevent' 'mongodb' 'perl')
 optdepends=('mongodb: High-performance schema-free document-oriented database')
 source=("http://pypi.python.org/packages/source/p/pymongo/pymongo-$pkgver.tar.gz")
-sha256sums=('0543f65364fb54fb54b954136cf6b5e689ab12a7c1d15c59c52d3d0c5fa73935')
+sha256sums=('1919bed7ad5d73940a6628b7420d326128dc68f3f67d4158abacff8b72a4eaa7')
 
 prepare() {
   cp -a "pymongo-$pkgver" "pymongo2-$pkgver"
@@ -31,26 +31,29 @@
 }
 
 check() {
-  MONGO_TMP_PORT=$(perl -MSocket -le 'socket S, PF_INET, SOCK_STREAM,getprotobyname("tcp");
-    $port = 50000;
-    ++$port until bind S, sockaddr_in($port,inet_aton("127.1"));
-    print $port')
-  echo "Picked port $MONGO_TMP_PORT to run tests with."
+  _mongod_run() {
+    MONGO_TMP_PORT=$(perl -MSocket -le 'socket S, PF_INET, SOCK_STREAM,getprotobyname("tcp");
+      $port = 50000;
+      ++$port until bind S, sockaddr_in($port,inet_aton("127.1"));
+      print $port')
+    echo "Picked port $MONGO_TMP_PORT to run tests with."
 
-  # Start a mongod instance for test
-  rm -rf "$srcdir/mongo_tmp"
-  mkdir "$srcdir/mongo_tmp"
-  rm -f "$srcdir/mongo_tmp.pid"
-  mongod --bind_ip localhost --port $MONGO_TMP_PORT --dbpath "$srcdir/mongo_tmp" --nojournal \
+    # Start a mongod instance for test
+    rm -rf "$srcdir/mongo_tmp"
+    mkdir "$srcdir/mongo_tmp"
+    rm -f "$srcdir/mongo_tmp.pid"
+    mongod --bind_ip localhost --port $MONGO_TMP_PORT --dbpath "$srcdir/mongo_tmp" --nojournal \
          --nohttpinterface --noauth --smallfiles --nssize 1 --fork --pidfilepath "$srcdir/mongo_tmp.pid" --logpath "$srcdir/mongo_tmp.log"
+    
+    DB_PORT=$MONGO_TMP_PORT "$@"
+    kill $(cat "$srcdir/mongo_tmp.pid")
+  }
 
   cd "$srcdir/pymongo-$pkgver"
-  DB_PORT=$MONGO_TMP_PORT python setup.py test
+  _mongod_run python setup.py test
 
   cd "$srcdir/pymongo2-$pkgver"
-  DB_PORT=$MONGO_TMP_PORT python2 setup.py test
-
-  kill $(cat "$srcdir/mongo_tmp.pid")
+  _mongod_run python2 setup.py test
 }
 
 package_python2-pymongo() {
@@ -65,12 +68,6 @@
 
   cd "pymongo-$pkgver"
   python setup.py install --root="$pkgdir" --skip-build --optimize=1
-
-  # Remove conflicting test folder
-  rm -r "$pkgdir/usr/lib/python3.4/site-packages/test"
-
-  # Remove malformed egg-info folder
-  rm -r "$pkgdir/usr/lib/python3.4/site-packages/pymongo.egg-info/"
 }
 
 # vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list