diff options
| author | Drew DeVault <sir@cmpwn.com> | 2019-03-06 14:01:23 -0700 |
|---|---|---|
| committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2019-03-18 21:05:57 +0000 |
| commit | d0f037160bf35f8524f430ee2d82ffcf36135719 (patch) | |
| tree | fbb5af98a675864de07201eebabad9a996ec90a5 /main | |
| parent | 2306edd3df2593efe482fff52bef5b582ce3c325 (diff) | |
| download | aports-d0f037160bf35f8524f430ee2d82ffcf36135719.tar.bz2 aports-d0f037160bf35f8524f430ee2d82ffcf36135719.tar.xz | |
main/py-text-unidecode: new APKBUILD
Diffstat (limited to 'main')
| -rw-r--r-- | main/py-text-unidecode/APKBUILD | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/main/py-text-unidecode/APKBUILD b/main/py-text-unidecode/APKBUILD new file mode 100644 index 0000000000..58c3900cc9 --- /dev/null +++ b/main/py-text-unidecode/APKBUILD @@ -0,0 +1,57 @@ +# Maintainer: Drew DeVault <sir@cmpwn.com> +pkgname=py-text-unidecode +_pkgname=text-unidecode +pkgver=1.2 +pkgrel=0 +pkgdesc="The most basic Text::Unidecode port" +url=https://github.com/kmike/text-unidecode/ +arch=noarch +license="Artistic-1.0-cl8" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +makedepends="py-setuptools" +checkdepends="pytest" +source="$pkgname-$pkgver.tar.gz::https://github.com/kmike/$_pkgname/archive/$pkgver.tar.gz" +builddir=$srcdir/$_pkgname-$pkgver + +prepare() { + cd "$builddir" + cp -r "$builddir" "$builddir"-py3 +} + +build() { + cd "$builddir" + python2 setup.py build + cd "$builddir"-py3 + python3 setup.py build +} + +check() { + cd "$builddir" + PYTHONPATH=src pytest-2 + cd "$builddir"-py3 + PYTHONPATH=src pytest-3 +} + +package() { + mkdir -p "$pkgdir" +} + +_py2() { + cd "$builddir" + _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="ce4bd80f8343ebca031a39f1fbe802cd86e3535a67d5e16f8a7f32442ab334e4e5e4d1cf74e8a55ef265765c879bfde87beffd31ff988efff1947f7c883694f9 py-text-unidecode-1.2.tar.gz" |
