# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). # See COPYING for license details. pkgbase=python-python-docx pkgname=('python2-python-docx' 'python-python-docx') _pkgname=python-docx pkgver=1.2.0 pkgrel=1 pkgdesc='Create and update Microsoft Word .docx files.' arch=('any') url='https://pypi.org/project/python-docx/#files' license=('MIT') makedepends=('python2-setuptools' 'python-setuptools') source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz") sha512sums=('8b8f952af90caf0ecc52e5b5db9be511b51175f4c124aa53def759711d89aa093b1daa3aee01e2e0dc24b9ebc31b781f28039c8bcd6412a7f410bdd6e6838892') prepare() { cp -a "$_pkgname-$pkgver"{,-2} } build() { cd "$_pkgname-$pkgver-2" python2 setup.py build cd "$srcdir/$_pkgname-$pkgver" python setup.py build } package_python2-python-docx() { depends=('python2' 'python2-lxml') cd "$_pkgname-$pkgver-2" python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build } package_python-python-docx() { depends=('python' 'python-lxml') cd "$_pkgname-$pkgver" python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build }