[arch-commits] Commit in python-matplotlib/trunk (PKGBUILD)
Felix Yan
fyan at archlinux.org
Mon Feb 15 05:04:17 UTC 2016
Date: Monday, February 15, 2016 @ 06:04:17
Author: fyan
Revision: 161588
upgpkg: python-matplotlib 1.5.1-2
fix tests
Modified:
python-matplotlib/trunk/PKGBUILD
----------+
PKGBUILD | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-02-15 03:43:39 UTC (rev 161587)
+++ PKGBUILD 2016-02-15 05:04:17 UTC (rev 161588)
@@ -29,22 +29,26 @@
'493a08914755d7d27d98025fc309f19cc3ec45e777fc81a56fa50430f90c0b39c2f66c2a01f6fd14a2e351005151365a25d2ab71ae2e80a54c6f57ceeacea35b')
prepare() {
- # Remove tests (FS#48175)
- cp "$srcdir/setup.cfg" "matplotlib-$pkgver"/
+ cp -a "$srcdir"/matplotlib-${pkgver}{,-py2}
- cp -a matplotlib-${pkgver} matplotlib-${pkgver}-py2
-
- cd matplotlib-${pkgver}
+ cd "$srcdir"/matplotlib-${pkgver}
for file in $(find . -name '*.py' -print); do
sed -i -e "s|^#!.*/usr/bin/python|#!/usr/bin/python3|" \
-e "s|^#!.*/usr/bin/env *python|#!/usr/bin/env python3|" ${file}
done
- cd ../matplotlib-${pkgver}-py2
+ cd "$srcdir"/matplotlib-${pkgver}-py2
for file in $(find . -name '*.py' -print); do
sed -i -e "s|^#!.*/usr/bin/python|#!/usr/bin/python2|" \
-e "s|^#!.*/usr/bin/env *python|#!/usr/bin/env python2|" ${file}
done
+
+ cp -a "$srcdir"/matplotlib-${pkgver}{,-test}
+ cp -a "$srcdir"/matplotlib-${pkgver}-py2{,-test}
+
+ # Remove tests (FS#48175)
+ cp "$srcdir/setup.cfg" "$srcdir"/matplotlib-$pkgver/
+ cp "$srcdir/setup.cfg" "$srcdir"/matplotlib-$pkgver-py2/
}
build() {
@@ -52,15 +56,21 @@
# and hangs the build checking if gtk3cairo is installed
export XDG_RUNTIME_DIR=/tmp
- cd matplotlib-${pkgver}
+ cd "$srcdir"/matplotlib-${pkgver}
python3 setup.py build
- cd ../matplotlib-${pkgver}-py2
+ cd "$srcdir"/matplotlib-${pkgver}-py2
python2 setup.py build
}
check() {
- cd matplotlib-${pkgver}
+ cd "$srcdir"/matplotlib-${pkgver}-test
+ python3 setup.py build
+
+ cd "$srcdir"/matplotlib-${pkgver}-py2-test
+ python2 setup.py build
+
+ cd "$srcdir"/matplotlib-${pkgver}-test
(
export PYTHONPATH="$PWD/build/lib.linux-$CARCH-3.5:$PYTHONPATH"
python -c "from matplotlib import font_manager"
@@ -69,7 +79,7 @@
python ../matplotlib-${pkgver}/tests.py -sv --processes=8 --process-timeout=300 || warning "Tests failed"
)
- cd ../matplotlib-${pkgver}-py2
+ cd "$srcdir"/matplotlib-${pkgver}-py2-test
(
export PYTHONPATH="$PWD/build/lib.linux-$CARCH-2.7:$PYTHONPATH"
python2 -c "from matplotlib import font_manager"
More information about the arch-commits
mailing list