mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 10:32:13 +08:00
39 lines
1.0 KiB
Bash
39 lines
1.0 KiB
Bash
# Maintainer: Manuel 'UtG' <utg.chakra.linux[at]gmail[dot]com>
|
|
|
|
pkgbase=python-mock
|
|
pkgname=(python2-mock python3-mock)
|
|
pkgver=1.0.1
|
|
pkgrel=1
|
|
pkgdesc='Mocking and Patching Library for Testing'
|
|
url='http://www.voidspace.org.uk/python/mock/'
|
|
makedepends=('python2' 'python3')
|
|
license=('BSD')
|
|
arch=('x86_64')
|
|
source=("http://pypi.python.org/packages/source/m/mock/mock-$pkgver.tar.gz")
|
|
md5sums=('c3971991738caa55ec7c356bbc154ee2')
|
|
|
|
build() {
|
|
cd "$srcdir"
|
|
cp -rf "mock-$pkgver" "mock2-$pkgver"
|
|
|
|
cd "$srcdir/mock-$pkgver"
|
|
python3 setup.py build
|
|
|
|
cd "$srcdir/mock2-$pkgver"
|
|
python2 setup.py build
|
|
}
|
|
|
|
package_python3-mock() {
|
|
depends=('python3')
|
|
cd "$srcdir/mock-$pkgver"
|
|
python3 setup.py install --optimize=1 --root="$pkgdir"
|
|
install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
|
|
}
|
|
|
|
package_python2-mock() {
|
|
depends=('python2')
|
|
cd "$srcdir/mock2-$pkgver"
|
|
python2 setup.py install --optimize=1 --root="$pkgdir"
|
|
install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
|
|
}
|