X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail.cmpwn.com (mail.cmpwn.com [45.56.77.53]) by lists.alpinelinux.org (Postfix) with ESMTP id 48106F84D93 for ; Wed, 6 Mar 2019 21:01:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cmpwn.com; s=cmpwn; t=1551906176; bh=Od2mC7i5/DfUHbSoNJ4Rd5qcPRzge8EjAeNLYnM1QVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wHxwlqRlpMc3J0W2148WO8CYDv1ECJsl62Zx5aRx16LYsA9dQCCumZtX0jXG0YbAj Z9N3gw1LSuh9a11Mb6OiETuZ6mFXVG3Ukcd8/eNiue/Aad9RfH3p+hkFoY06bWFDYR 3RwQO04g48YW1y2+4Gt2DkQdXwuRdToeRqW1/1i8= From: Drew DeVault To: alpine-aports@lists.alpinelinux.org Cc: Drew DeVault Subject: [alpine-aports] [PATCH 4/7] main/py-faker: new APKBUILD Date: Wed, 6 Mar 2019 14:01:25 -0700 Message-Id: <20190306210128.13101-5-sir@cmpwn.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190306210128.13101-1-sir@cmpwn.com> References: <20190306210128.13101-1-sir@cmpwn.com> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit --- main/py-faker/APKBUILD | 64 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 main/py-faker/APKBUILD diff --git a/main/py-faker/APKBUILD b/main/py-faker/APKBUILD new file mode 100644 index 0000000000..51bff43b97 --- /dev/null +++ b/main/py-faker/APKBUILD @@ -0,0 +1,64 @@ +# Maintainer: Drew DeVault +pkgname=py-faker +_pkgname=Faker +pkgver=1.0.2 +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" +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="cd484d2ce244fab0d47b2b4fe541f050f2400d2a8291589ed5ace4a664ecc264294e7f994fb4a12e5f082ac67f1c3bc2f6090fcea5f57cbc7469dfe7195a99b7 Faker-1.0.2.tar.gz" -- 2.21.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---