# Maintainer: Erich Eckner pkgbase=python-wxmplot pkgname=(python2-wxmplot python-wxmplot) _pkgname="${pkgbase#*-}" pkgver=0.9.39 pkgrel=1 pkgdesc='A library for plotting in wxPython using matplotlib' arch=('any') url='https://pypi.python.org/pypi/wxmplot/0.9.18' license=('OSI Approved :: MIT License') _deppy2=( 'python2>=2.7' 'python2<2.8' 'python2-wxpython3' ) _deppy=( 'python>=3.8' 'python<3.9' 'python-wxpython>=4.0.3' ) _depends=( 'python-matplotlib>=2.0' 'python-numpy>=1.12' 'python-six>=1.10') _makedepends=( 'python-setuptools') makedepends=( "${_deppy[@]}" "${_deppy2[@]}" "${_depends[@]}" "${_depends[@]/python/python2}" "${_makedepends[@]}" "${_makedepends[@]/ython/ython2}" ) source=( "https://pypi.python.org/packages/02/42/a75906a70693de6b885908d360e53fb44c8aaca668d3b3b0bc9cb6d0f759/${_pkgname}-${pkgver}.tar.gz" ) sha512sums=('110b55c42c115cf19a95cc76d3d4eb96e4cae3dbc57a2bc48af71ee351d2b1ad2a31103b22ef8443f90f65f08a35d6094a98b695a9ac787d77356f2273ab29b1') prepare() { cp -a ${_pkgname}-${pkgver}{,-py2} } build() { echo "Building python..." ( cd ${_pkgname}-${pkgver} python setup.py build ) echo "Building python2..." ( cd ${_pkgname}-${pkgver}-py2 python2 setup.py build ) } package_python2-wxmplot() { depends=( "${_deppy2[@]}" "${_depends[@]/python/python2}" ) cd ${_pkgname}-${pkgver}-py2 python2 setup.py install --skip-build --root="${pkgdir}" --prefix=/usr find "${pkgdir}" -type f -exec sed -si '1 s#[/ ]python\s*$# python2#' {} + } package_python-wxmplot() { depends=( "${_deppy[@]}" "${_depends[@]}" ) cd ${_pkgname}-${pkgver} python setup.py install --skip-build --root="${pkgdir}" --prefix=/usr }