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

Andrzej Giniewicz aginiewicz at archlinux.org
Thu Sep 4 09:04:47 UTC 2014


    Date: Thursday, September 4, 2014 @ 11:04:46
  Author: aginiewicz
Revision: 118257

upgpkg: python-statsmodels 0.5.0-2

python-statsmodels: fix mtime

Modified:
  python-statsmodels/trunk/PKGBUILD

----------+
 PKGBUILD |   18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-09-04 08:55:14 UTC (rev 118256)
+++ PKGBUILD	2014-09-04 09:04:46 UTC (rev 118257)
@@ -5,7 +5,7 @@
 pkgbase=python-statsmodels
 pkgname=('python2-statsmodels' 'python-statsmodels')
 pkgver=0.5.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Statistical computations and models for use with SciPy"
 arch=('i686' 'x86_64')
 url="http://statsmodels.sourceforge.net/"
@@ -15,10 +15,21 @@
 source=("https://pypi.python.org/packages/source/s/statsmodels/statsmodels-${pkgver}.tar.gz")
 md5sums=('c65454d97f869ac0e5bb3a2757ec6bd5')
 
-build() {
+prepare() {
   cd "$srcdir"
   cp -a statsmodels-${pkgver} statsmodels-py2-${pkgver}
+  cd statsmodels-py2-${pkgver}
 
+  sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+      -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+      -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
+      -i $(find . -name '*.py')
+
+  cd "$srcdir"/statsmodels-${pkgver}
+  python setup.py clean
+}
+
+build() {
   msg "Building Python2"
   cd "$srcdir"/statsmodels-py2-${pkgver}
   python2 setup.py build
@@ -25,7 +36,6 @@
 
   msg "Building Python3"
   cd "$srcdir"/statsmodels-${pkgver}
-  python setup.py clean
   python setup.py build
 }
 
@@ -38,8 +48,6 @@
 
   python2 setup.py install --skip-build --root="$pkgdir" --optimize=1
 
-  sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" $(find "${pkgdir}" -name '*.py')
-
   install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }
 




More information about the arch-commits mailing list