diff options
Diffstat (limited to 'community')
-rw-r--r-- | community/py-setuptools_scm/APKBUILD | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/community/py-setuptools_scm/APKBUILD b/community/py-setuptools_scm/APKBUILD new file mode 100644 index 0000000000..c5f674ca4b --- /dev/null +++ b/community/py-setuptools_scm/APKBUILD @@ -0,0 +1,53 @@ +# Contributor: Dmitry Romanenko <dmitry@romanenko.in> +# Maintainer: Dmitry Romanenko <dmitry@romanenko.in> +pkgname=py-setuptools_scm +_pkgname=setuptools_scm +pkgver=3.2.0 +pkgrel=0 +pkgdesc="the blessed package to manage your versions by scm tags" +url="https://github.com/pypa/setuptools_scm" +arch="noarch" +license="MIT" +depends="" +checkdepends="pytest py-pip mercurial" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir"/$_pkgname-$pkgver + +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + PYTHONPATH=$PWD/src python2 -m pytest + PYTHONPATH=$PWD/src python3 -m pytest +} + +package() { + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +sha512sums="1995754654f8bf509ec7f2186857ba0005dbaea0b1c734f521becb9d022c127e7b36f21da8defd5ec9883de5d0d4afe006f9d152c4cefe6beadf8b878e949eb2 setuptools_scm-3.2.0.tar.gz" |