blob: 9d58b1ab2225f566e06b1c1879a5fd603e572004 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py-faker
_pkgname=Faker
pkgver=1.0.4
pkgrel=0
pkgdesc="Python package that generates fake data for you"
url=https://faker.readthedocs.io/en/master/
arch=noarch
license=MIT
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
depends="py-dateutil py-six py-text-unidecode"
makedepends="py-setuptools python2-dev python3-dev"
checkdepends="
py-email-validator py-ukpostcodeparser py-mock pytest py-more-itertools
py2-ipaddress
"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir=$srcdir/$_pkgname-$pkgver
prepare() {
cd "$builddir"
# They erroneously require a specific version of pytest
sed -i setup.py -e 's/ *"pytest>=.*//g'
cp -r "$builddir" "$builddir"-py3
}
build() {
cd "$builddir"
python2 setup.py build
cd "$builddir"-py3
python3 setup.py build
}
check() {
cd "$builddir"
python2 setup.py test
cd "$builddir"-py3
python3 setup.py test
}
package() {
mkdir -p "$pkgdir"
}
_py2() {
cd "$builddir"
depends="$depends py2-ipaddress"
_py python2
}
_py3() {
cd "$builddir"-py3
_py python3
}
_py() {
python="$1"
pkgdesc="$pkgdesc (for $python)"
depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="6ab4814b0cde3b1146b0eb82c08b1eac6bf168fab261fd50c4ab399b51b84728b8ad6e64a372291fabc58c40621a19331d2511e123383bdf7d7612eb6fa2ad97 Faker-1.0.4.tar.gz"
|