diff options
author | TBK <tbk@jjtc.eu> | 2019-02-12 01:51:55 +0100 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-03-12 21:25:31 +0000 |
commit | ccff385f16acc69b6049befc9d429e742399fb9c (patch) | |
tree | 484291898369cbd58c68a2998a66265db70ae7e4 /community/py-setuptools_scm | |
parent | 08b0cb031c5a51fad847b9182ebe27bd57e67fd1 (diff) | |
download | aports-ccff385f16acc69b6049befc9d429e742399fb9c.tar.bz2 aports-ccff385f16acc69b6049befc9d429e742399fb9c.tar.xz |
community/py-setuptools_scm: moved from testing
Diffstat (limited to 'community/py-setuptools_scm')
-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" |