# $Id: PKGBUILD 112217 2014-05-30 04:55:52Z arcanis $ # Maintainer: Evgeniy Alekseev # Contributor: Stunts # Contributor: damir pkgbase=python-biopython pkgname=('python-biopython' 'python2-biopython') _pkgname=biopython pkgver=1.64 pkgrel=2 pkgdesc="Freely available Python tools for computational molecular biology" arch=('i686' 'x86_64') url="http://www.biopython.org" license=('custom') depends=('python-numpy' 'python2-numpy') source=(http://www.biopython.org/DIST/${_pkgname}-${pkgver}.tar.gz) md5sums=('c7636372c4e775d59391e0aa1f0c56c7') prepare() { cp -r "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-py2" # change python to python2 find "${_pkgname}-${pkgver}-py2" -name '*.py' -type f -exec \ sed -i 's|env python|env python2|' {} \; } build() { cd "${srcdir}/${_pkgname}-${pkgver}" python setup.py build cd "${srcdir}/${_pkgname}-${pkgver}-py2" python2 setup.py build } package_python-biopython() { depends=('python-numpy') optdepends=('python-mysql-connector: for BioSQL module') cd "${srcdir}/${_pkgname}-${pkgver}" python setup.py install --root="${pkgdir}" install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } package_python2-biopython() { depends=('python2-numpy') optdepends=('python2-reportlab: for pdf graphics code' 'python2-mysql-connector: for BioSQL module' 'mysql-python: for BioSQL module') cd "${srcdir}/${_pkgname}-${pkgver}-py2" python2 setup.py install --root="${pkgdir}" install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }