[arch-commits] Commit in python-softlayer/repos (2 files)

Felix Yan felixonmars at archlinux.org
Thu Jul 12 20:37:05 UTC 2018


    Date: Thursday, July 12, 2018 @ 20:37:05
  Author: felixonmars
Revision: 358194

archrelease: copy trunk to community-staging-any

Added:
  python-softlayer/repos/community-staging-any/
  python-softlayer/repos/community-staging-any/PKGBUILD
    (from rev 358193, python-softlayer/trunk/PKGBUILD)

----------+
 PKGBUILD |   61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

Copied: python-softlayer/repos/community-staging-any/PKGBUILD (from rev 358193, python-softlayer/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2018-07-12 20:37:05 UTC (rev 358194)
@@ -0,0 +1,61 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-softlayer
+pkgname=('python-softlayer' 'python2-softlayer')
+pkgver=5.4.4
+pkgrel=2
+pkgdesc="A library for SoftLayer's API"
+arch=('any')
+license=('MIT')
+url='https://github.com/softlayer/softlayer-python'
+makedepends=('python-setuptools' 'python2-setuptools' 'python-prettytable' 'python2-prettytable'
+             'python-click' 'python2-click' 'python-requests' 'python2-requests'
+             'python-prompt_toolkit' 'python2-prompt_toolkit' 'python-pygments' 'python2-pygments')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-mock' 'python2-mock'
+              'python-testtools' 'python2-testtools')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/softlayer/softlayer-python/archive/v$pkgver.tar.gz")
+sha512sums=('b82cdf202a18e4cfed906d4bb2944235f61e2a19592b4ebbbb18b56f281f1007889e785f46763043a67cddfb15be3a1dd45cb13348dbfb5239a09cbbc202785e')
+
+prepare() {
+  cp -a softlayer-python-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/softlayer-python-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/softlayer-python-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/softlayer-python-$pkgver
+  python setup.py pytest
+
+  cd "$srcdir"/softlayer-python-$pkgver-py2
+  python2 setup.py pytest
+}
+
+package_python-softlayer() {
+  depends=('python-setuptools' 'python-prettytable' 'python-click' 'python-requests'
+           'python-prompt_toolkit' 'python-pygments')
+
+  cd softlayer-python-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-softlayer() {
+  depends=('python2-setuptools' 'python2-prettytable' 'python2-click' 'python2-requests'
+           'python2-prompt_toolkit' 'python2-pygments')
+
+  cd softlayer-python-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+  mv "$pkgdir"/usr/bin/sl{,2}
+  mv "$pkgdir"/usr/bin/slcli{,2}
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list