# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). # See COPYING for license details. pkgbase=python-cookiecutter pkgname=('python2-cookiecutter' 'python-cookiecutter') _pkgname=cookiecutter pkgver=2.4.0 pkgrel=1 pkgdesc='A command-line utility that creates projects from cookiecutters (project templates).' arch=('any') url='https://pypi.org/project/cookiecutter/#files' license=('BSD') makedepends=('python2-setuptools' 'python-setuptools') source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz") sha512sums=('577a400b6a4852cb8a880b7340d9dab5003dbfe7cb7b3c8173c3f489524a535e17def8bae35334bafcb47cfd5e0a8c9a9c8d82f99938cafc3bfaac164b75aac6') prepare() { cp -a "$_pkgname-$pkgver"{,-2} cd "$_pkgname-$pkgver-2" grep -iRl 'python' * | xargs \ sed -i 's|#!.*/usr/bin/python|#!/usr/bin/python2|;s|#!.*/usr/bin/env python$|#!/usr/bin/env python2|' } package_python2-cookiecutter() { depends=('python2-future' 'python2-jinja' 'python2-yaml' 'python2-binaryornot' 'python2-click' 'python2-poyo' 'python2-requests' 'python2-jinja-time' 'python2-whichcraft') cd "$_pkgname-$pkgver-2" python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build mv "$pkgdir/usr/bin/$_pkgname" "$pkgdir/usr/bin/${_pkgname}2" } package_python-cookiecutter() { depends=('python-future' 'python-jinja' 'python-yaml' 'python-binaryornot' 'python-click' 'python-poyo' 'python-requests' 'python-jinja-time' 'python-whichcraft') cd "$_pkgname-$pkgver" python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build }