diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-08-29 02:12:59 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-09-03 17:44:34 -0300 |
commit | d4234f0e133c2f6974fedbcecfe56baccdcbfce0 (patch) | |
tree | cdc4c9831ff4de824450ce8c86fb07ed89fbd05b /community/py3-factory-boy | |
parent | 809cccc33c60a9b102daf83597560f15c83fc4a4 (diff) | |
download | aports-d4234f0e133c2f6974fedbcecfe56baccdcbfce0.tar.bz2 aports-d4234f0e133c2f6974fedbcecfe56baccdcbfce0.tar.xz |
community/py3-factory-boy: drop py2
Diffstat (limited to 'community/py3-factory-boy')
-rw-r--r-- | community/py3-factory-boy/APKBUILD | 53 |
1 files changed, 12 insertions, 41 deletions
diff --git a/community/py3-factory-boy/APKBUILD b/community/py3-factory-boy/APKBUILD index ac473ebb38..661f181fc4 100644 --- a/community/py3-factory-boy/APKBUILD +++ b/community/py3-factory-boy/APKBUILD @@ -1,72 +1,43 @@ # Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> # Maintainer: Drew DeVault <sir@cmpwn.com> -pkgname=py-factory-boy +pkgname=py3-factory-boy _pkgname=factory_boy pkgver=2.12.0 -pkgrel=0 +pkgrel=1 pkgdesc="A verstile test fixtures replacement based on thoughtbot's factory_girl for Ruby" url=https://github.com/rbarrois/factory_boy -arch=noarch +arch="noarch" license=MIT -_py2_deps="py2-faker py2-six" -_py2_deps="py3-faker py3-six" -makedepends="$_py2_deps $_py3_deps py2-setuptools py3-setuptools" +depends="python3 py3-faker py3-six" +makedepends="py3-setuptools" checkdepends=" - py2-mock py3-mock py2-django py3-django py2-sqlalchemy py3-sqlalchemy + py3-mock py3-django py3-sqlalchemy " -subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="$pkgname-$pkgver.tar.gz::https://github.com/FactoryBoy/$_pkgname/archive/$pkgver.tar.gz" -builddir=$srcdir/$_pkgname-$pkgver +builddir="$srcdir/$_pkgname-$pkgver" + +replaces="py-factory-boy" # Backwards compatibility +provides="py-factory-boy=$pkgver-r$pkgrel" # Backwards compatibility prepare() { - cd "$builddir" default_prepare # mongodb is not supported by Alpine Linux rm factory/mongoengine.py sed -i factory/__init__.py -e 's/from . import mongoengine//g' rm tests/test_mongoengine.py sed -i tests/__init__.py -e 's/from .test_mongoengine.*//g' - cp -r "$builddir" "$builddir"-py3 } build() { - cd "$builddir" - python2 setup.py build - cd "$builddir"-py3 python3 setup.py build } check() { - cd "$builddir" - # sqlalchemy deprecation test fails on Python 2; benign failure - #python2 setup.py test - cd "$builddir"-py3 python3 setup.py test } package() { - mkdir -p "$pkgdir" -} - -_py2() { - replaces="py-factory-boy" - depends="$_py2_deps" - cd "$builddir" - _py python2 -} - -_py3() { - depends="$_py3_deps" - 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" + python3 setup.py install --prefix=/usr --root="$pkgdir" } -sha512sums="33236bc02d5331998bb210af498bea46fc9540e66af32db8fdab563193b7ae8870e7cc01c93c24a03ee23ba64bac6ca27a72bb51a264d1c7b6bf9b098c65d5d2 py-factory-boy-2.12.0.tar.gz" +sha512sums="33236bc02d5331998bb210af498bea46fc9540e66af32db8fdab563193b7ae8870e7cc01c93c24a03ee23ba64bac6ca27a72bb51a264d1c7b6bf9b098c65d5d2 py3-factory-boy-2.12.0.tar.gz" |