diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-22 12:31:22 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-22 14:21:34 +0000 |
commit | 6d0175348d85ed0105c843e1fd56766c3c499809 (patch) | |
tree | a0a6c34322c835b05144346ef70e56900ebaf11a | |
parent | d85dbba6ae6f3931a541970089e79dadeec81574 (diff) | |
download | aports-6d0175348d85ed0105c843e1fd56766c3c499809.tar.bz2 aports-6d0175348d85ed0105c843e1fd56766c3c499809.tar.xz |
community/py-dicttoxml: moved from testing, added python3 support and py2/py3 subpackages
-rw-r--r-- | community/py-dicttoxml/APKBUILD | 49 | ||||
-rw-r--r-- | testing/py-dicttoxml/APKBUILD | 31 |
2 files changed, 49 insertions, 31 deletions
diff --git a/community/py-dicttoxml/APKBUILD b/community/py-dicttoxml/APKBUILD new file mode 100644 index 0000000000..aec9ff4a98 --- /dev/null +++ b/community/py-dicttoxml/APKBUILD @@ -0,0 +1,49 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=py-dicttoxml +_pkgname=dicttoxml +pkgver=1.7.4 +pkgrel=0 +pkgdesc="Converts a Python dictionary or other native data type into a valid XML string" +url="https://github.com/quandyfactory/dicttoxml" +arch="noarch" +license="GPL2" +depends="" +makedepends="python2-dev python3-dev" +install="" +subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_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 || return 1 + python3 setup.py build || return 1 +} + +package() { + mkdir -p "$pkgdir" +} + +_py() { + local python=$1 + pkgdesc="$pkgdesc - $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + _py python2 + replaces="$pkgname" +} + +_py3() { + _py python3 +} + + +md5sums="ec5643a048cf32dad3c28db236b923e4 dicttoxml-1.7.4.tar.gz" +sha256sums="ea44cc4ec6c0f85098c57a431a1ee891b3549347b07b7414c8a24611ecf37e45 dicttoxml-1.7.4.tar.gz" +sha512sums="91abcf2b9b248717618e9fc1c8694e881b9deaa16438dd4674f94a22b4aabfdab3b13f95c3d44a60577d49eca82fb268f59b33d1312cf5388bdaf949a2865cbf dicttoxml-1.7.4.tar.gz" diff --git a/testing/py-dicttoxml/APKBUILD b/testing/py-dicttoxml/APKBUILD deleted file mode 100644 index 66a0ab5f66..0000000000 --- a/testing/py-dicttoxml/APKBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Contributor: Francesco Colista <fcolista@alpinelinux.org> -# Maintainer: Francesco Colista <fcolista@alpinelinux.org> -pkgname=py-dicttoxml -_pkgname=dicttoxml -pkgver=1.6.6 -pkgrel=0 -pkgdesc="Converts a Python dictionary or other native data type into a valid XML string" -url="https://github.com/quandyfactory/dicttoxml" -arch="noarch" -license="GPL2" -depends="" -depends_dev="" -makedepends="$depends_dev python-dev" -install="" -subpackages="" -source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" - -builddir="$srcdir/$_pkgname-$pkgver" -build() { - cd "$builddir" - python setup.py build || return 1 -} - -package() { - cd "$builddir" - python setup.py install --prefix=/usr --root="$pkgdir" || return 1 -} - -md5sums="5318bc0dbd1fe0a265ec23bd680c5ead dicttoxml-1.6.6.tar.gz" -sha256sums="8229dcbadbe8a417b5e221b0bd56dff8a8ffd250951e6e95d51d5c5e2a77cc68 dicttoxml-1.6.6.tar.gz" -sha512sums="d2bf83f107b5d81a4fd04e9a5beb162db65808f7bb97d15de5d34beb8a4a2f68fce9e4c46f9c0c56d56c4fcce48181b3175a821834e4fb18d1ee4bc1ac952c8b dicttoxml-1.6.6.tar.gz" |