diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-07-21 15:28:02 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-07-21 15:33:51 -0300 |
commit | 281409e9f719663f971854af9aa9cb8bf4cf7543 (patch) | |
tree | af7e9da4ca384b619571d8d155e206d88d34e2fc /community/py3-entrypoints/APKBUILD | |
parent | d6f4f2c2f8b7ad5d1756713c6405bd082939225e (diff) | |
download | aports-281409e9f719663f971854af9aa9cb8bf4cf7543.tar.bz2 aports-281409e9f719663f971854af9aa9cb8bf4cf7543.tar.xz |
community/py3-entrypoints: rename from py-entrypoints
Diffstat (limited to 'community/py3-entrypoints/APKBUILD')
-rw-r--r-- | community/py3-entrypoints/APKBUILD | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/community/py3-entrypoints/APKBUILD b/community/py3-entrypoints/APKBUILD new file mode 100644 index 0000000000..05616d9db0 --- /dev/null +++ b/community/py3-entrypoints/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Keith Maxwell <keith.maxwell@gmail.com> +# Maintainer: Keith Maxwell <keith.maxwell@gmail.com> +pkgname=py-entrypoints +_pyname=entrypoints +pkgver=0.3 +pkgrel=1 +pkgdesc="Discover and load entry points from installed packages." +url="https://github.com/takluyver/entrypoints" +arch="noarch" +license="MIT" +checkdepends="py3-pytest py2-pytest py2-configparser" +source="https://files.pythonhosted.org/packages/source/e/${_pyname}/${_pyname}-${pkgver}.tar.gz" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" + +builddir="$srcdir/$_pyname-$pkgver" + +prepare() { + default_prepare + cp -R "${builddir}" "${builddir}-py2" +} + +build() { + cd "$builddir" + python3 setup.py build + cd "$builddir-py2" + python2 setup.py build +} + +check() { + cd "$builddir" + pytest-3 + cd "$builddir-py2" + pytest-2 +} + +package() { + mkdir -p "${pkgdir}" +} + +_py3() { + depends="python3" + install_if="$pkgname=$pkgver-r$pkgrel python3" + cd "$builddir" + python3 setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + depends="python2 py2-configparser" + install_if="$pkgname=$pkgver-r$pkgrel python2" + cd "$builddir-py2" + python2 setup.py install --prefix=/usr --root="$subpkgdir" +} + +sha512sums="aa1274362d3a4b00266103319ca51aa266605b4999c89a9d0673eb61bfae9e646cb0ec6b86c95544493f6fe048385a2c7641d64adca8f45815546fb1e663c858 entrypoints-0.3.tar.gz" |