diff options
author | Carlo Landmeter <clandmeter@alpinelinux.org> | 2019-03-21 10:33:54 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2019-03-21 10:33:54 +0000 |
commit | a0a0a78372524ea00b463dcfe1cc8cc0d4953273 (patch) | |
tree | b9e29c30f5af9076f248449869e5a9676bdf3043 /community/py-faker | |
parent | 4f9d421b63c04f44061610e9f529910551c2d355 (diff) | |
download | aports-a0a0a78372524ea00b463dcfe1cc8cc0d4953273.tar.bz2 aports-a0a0a78372524ea00b463dcfe1cc8cc0d4953273.tar.xz |
py various: move back to community due to py-sqlalchemy move
Diffstat (limited to 'community/py-faker')
-rw-r--r-- | community/py-faker/APKBUILD | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/community/py-faker/APKBUILD b/community/py-faker/APKBUILD new file mode 100644 index 0000000000..9d58b1ab22 --- /dev/null +++ b/community/py-faker/APKBUILD @@ -0,0 +1,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" |