mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 19:55:26 +03:00
testing/py-matplotlib: improve abuild, fix tests split function
This commit is contained in:
parent
c0ec39f71e
commit
b900ab2d0a
1 changed files with 12 additions and 26 deletions
|
@ -1,6 +1,7 @@
|
|||
# Contributor: Isaac Dunham <ibid.ag@gmail.com>
|
||||
# Maintainer: Isaac Dunham <ibid.ag@gmail.com>
|
||||
pkgname=py-matplotlib
|
||||
_pkgname=matplotlib
|
||||
pkgver=1.5.1
|
||||
pkgrel=0
|
||||
pkgdesc="A Python library for plots"
|
||||
|
@ -8,48 +9,33 @@ url="http://matplotlib.org"
|
|||
arch="all"
|
||||
license="custom"
|
||||
depends="python py-numpy py-tkinter py-dateutil py-parsing py-tz py-cycler"
|
||||
depends_dev=""
|
||||
makedepends="$depends python-dev gfortran py-numpy-dev freetype-dev
|
||||
libpng-dev tk-dev py-setuptools"
|
||||
install=""
|
||||
makedepends="python-dev gfortran py-numpy-dev freetype-dev libpng-dev tk-dev
|
||||
py-setuptools"
|
||||
subpackages="$pkgname-doc $pkgname-tests"
|
||||
source="matplotlib-$pkgver.tar.gz::https://github.com/matplotlib/matplotlib/archive/v$pkgver.tar.gz"
|
||||
|
||||
_builddir="$srcdir"/matplotlib-$pkgver
|
||||
prepare() {
|
||||
local i
|
||||
cd "$_builddir"
|
||||
for i in $source; do
|
||||
case $i in
|
||||
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
source="$_pkgname-$pkgver.tar.gz::https://github.com/matplotlib/$_pkgname/archive/v$pkgver.tar.gz"
|
||||
builddir="$srcdir/$_pkgname-$pkgver"
|
||||
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
cd "$builddir"
|
||||
python setup.py build || return 1
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_builddir"
|
||||
cd "$builddir"
|
||||
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" || return 1
|
||||
install -m755 -d "$pkgdir"/usr/share/licenses/custom/$pkgname
|
||||
install -m644 LICENSE/* "$pkgdir"/usr/share/licenses/custom/$pkgname/
|
||||
}
|
||||
|
||||
tests() {
|
||||
pkgdesc="Tests for matplotlib"
|
||||
pkgdesc="$pkgdesc (tests)"
|
||||
arch="noarch"
|
||||
depends="$depends py-nose"
|
||||
cd "$pkgdir"/usr/lib || return 1
|
||||
export _pysub="`ls`" && test -n "$_pysub" || return 1
|
||||
mkdir -p "$subpkgdir"/usr/lib/"$_pysub"/site-packages/matplotlib \
|
||||
|| return 1
|
||||
mv "$_pysub"/site-packages/matplotlib/tests \
|
||||
"$subpkgdir"/usr/lib/"$_pysub"/site-packages/matplotlib \
|
||||
|| return 1
|
||||
local sitepath="$(python2 -c 'import site; print(site.getsitepackages()[0])')/$_pkgname"
|
||||
|
||||
mkdir -p "$subpkgdir"$sitepath
|
||||
mv "$pkgdir"$sitepath/tests "$subpkgdir"$sitepath/
|
||||
}
|
||||
|
||||
md5sums="b22dc4962f36aab919a7125b3b35953b matplotlib-1.5.1.tar.gz"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue