From 8e9715352c22582f2caf5a0d3c1864d4f2c422c6 Mon Sep 17 00:00:00 2001 From: Ram-Z Date: Sun, 12 Nov 2017 19:12:09 +0000 Subject: [PATCH] python-progressbar: update and rebuild for python3 Also add new python-utils dependency --- python-progressbar/PKGBUILD | 45 +++++++++++++++++++++++++++++++++++ python-utils/PKGBUILD | 44 ++++++++++++++++++++++++++++++++++ python3-progressbar2/PKGBUILD | 17 ------------- python3.order | 2 ++ 4 files changed, 91 insertions(+), 17 deletions(-) create mode 100644 python-progressbar/PKGBUILD create mode 100644 python-utils/PKGBUILD delete mode 100644 python3-progressbar2/PKGBUILD diff --git a/python-progressbar/PKGBUILD b/python-progressbar/PKGBUILD new file mode 100644 index 000000000..957c8640c --- /dev/null +++ b/python-progressbar/PKGBUILD @@ -0,0 +1,45 @@ +_pkgname=python-progressbar2 +_pypiname=progressbar2 +pkgbase=python-progressbar +pkgdesc="A progress bar for Python 2 and Python 3" +pkgname=('python3-progressbar' 'python2-progressbar') +pkgver=3.34.3 +pkgrel=1 +url="https://github.com/WoLpH/python-progressbar" +license=('BSD') +arch=("any") +makedepends=('python3' 'python3-setuptools' 'python2' 'python2-setuptools' 'python3-utils' 'python2-utils') +source=("${_pkgname}-${pkgver}.tar.gz::https://pypi.org/packages/source/p/${_pypiname}/${_pypiname}-${pkgver}.tar.gz" + "${_pkgname}-${pkgver}.tar.gz.asc::https://pypi.org/packages/source/p/${_pypiname}/${_pypiname}-${pkgver}.tar.gz.asc") +sha512sums=('379cb7ad3a46176fd4280d735d913cd06d8e39c5532fd4d7ebf4e87a37c013b6cf863df4691d623456300b4d7437ecaccedad3fc8570105c13dc8b311c3f09b2' + 'SKIP') +validpgpkeys=('149325FD15904E9C4EB89E95E81444E9CE1F695D') # Rick van Hattem + +prepare() { + cp -a "${srcdir}/${_pypiname}-${pkgver}"{,-py2} +} + +build() { + cd "${srcdir}/${_pypiname}-${pkgver}" + python3 setup.py build + + cd "${srcdir}/${_pypiname}-${pkgver}-py2" + python2 setup.py build +} + +package_python3-progressbar() { + depends=('python3' 'python3-utils') + replaces=('python3-progressbar2') + + cd "${srcdir}/${_pypiname}-${pkgver}" + python3 setup.py install --skip-build --root="${pkgdir}" --optimize=1 + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + +package_python2-progressbar() { + depends=('python2' 'python2-utils') + + cd "${srcdir}/${_pypiname}-${pkgver}-py2" + python2 setup.py install --skip-build --root="${pkgdir}" --optimize=1 + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} diff --git a/python-utils/PKGBUILD b/python-utils/PKGBUILD new file mode 100644 index 000000000..e0031fabe --- /dev/null +++ b/python-utils/PKGBUILD @@ -0,0 +1,44 @@ +_pkgname=python-utils +_pypiname=python-utils +pkgbase=python-utils +pkgdesc="A module with some convenient utilities not included with the standard Python install" +pkgname=('python3-utils' 'python2-utils') +pkgver=2.2.0 +pkgrel=1 +url="https://github.com/WoLpH/python-utils" +license=('BSD') +arch=("any") +makedepends=('python3' 'python3-setuptools' 'python2' 'python2-setuptools') +source=("${_pkgname}-${pkgver}.tar.gz::https://pypi.org/packages/source/p/${_pypiname}/${_pypiname}-${pkgver}.tar.gz" + "${_pkgname}-${pkgver}.tar.gz.asc::https://pypi.org/packages/source/p/${_pypiname}/${_pypiname}-${pkgver}.tar.gz.asc") +sha512sums=('02b3b7f3ebdab8b8f82221634336e1e54ebee58e2b3a8348cbad218ff8a1b55efdace5df8dd105d77b6eecbf30876e7b4bca3ca7cda7b34c10993741dda8570e' + 'SKIP') +validpgpkeys=('149325FD15904E9C4EB89E95E81444E9CE1F695D') # Rick van Hattem + +prepare() { + cp -a "${srcdir}/${_pypiname}-${pkgver}"{,-py2} +} + +build() { + cd "${srcdir}/${_pypiname}-${pkgver}" + python3 setup.py build + + cd "${srcdir}/${_pypiname}-${pkgver}-py2" + python2 setup.py build +} + +package_python3-utils() { + depends=('python3' 'python3-six') + + cd "${srcdir}/${_pypiname}-${pkgver}" + python3 setup.py install --skip-build --root="${pkgdir}" --optimize=1 + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + +package_python2-utils() { + depends=('python2' 'python2-six') + + cd "${srcdir}/${_pypiname}-${pkgver}-py2" + python2 setup.py install --skip-build --root="${pkgdir}" --optimize=1 + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} diff --git a/python3-progressbar2/PKGBUILD b/python3-progressbar2/PKGBUILD deleted file mode 100644 index d4dd72b43..000000000 --- a/python3-progressbar2/PKGBUILD +++ /dev/null @@ -1,17 +0,0 @@ -pkgname=python3-progressbar2 -_pkgname=progressbar2 -pkgver=3.6.2 -pkgrel=1 -pkgdesc='Provide visual (yet text based) progress to long running operations' -arch=('any') -url='https://github.com/WoLpH/python-progressbar' -license=('BSD') -depends=('python3') -makedepends=('python3-setuptools') -source=("https://pypi.python.org/packages/source/p/${_pkgname}/${_pkgname}-${pkgver}.tar.gz") -sha256sums=('0dbf2c89f900f0e420933ed0679562d7624e54b6e2bad70577a4682e476f45d6') - -package() { - cd "${_pkgname}-${pkgver}" - python3 setup.py install --root="${pkgdir}/" -} diff --git a/python3.order b/python3.order index 52b8553d9..bbe9ea305 100644 --- a/python3.order +++ b/python3.order @@ -91,3 +91,5 @@ python3-ccr python3-aur python3-inflection python-termcolor +python-utils +python-progressbar