[arch-commits] Commit in python-cliff/trunk (PKGBUILD new-cmd2.patch)
Felix Yan
felixonmars at archlinux.org
Thu Mar 12 00:25:12 UTC 2020
Date: Thursday, March 12, 2020 @ 00:25:11
Author: felixonmars
Revision: 594796
upgpkg: python-cliff 3.0.0-2
fix compatibility with new cmd2 (FS#65335)
Added:
python-cliff/trunk/new-cmd2.patch
Modified:
python-cliff/trunk/PKGBUILD
----------------+
PKGBUILD | 13 ++++++++++---
new-cmd2.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-03-12 00:25:06 UTC (rev 594795)
+++ PKGBUILD 2020-03-12 00:25:11 UTC (rev 594796)
@@ -3,7 +3,7 @@
pkgname=python-cliff
pkgver=3.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="Command Line Interface Formulation Framework"
arch=('any')
url="https://docs.openstack.org/cliff/latest/"
@@ -13,11 +13,18 @@
makedepends=('git')
checkdepends=('python-testrepository' 'python-mock' 'python-sphinx' 'python-testscenarios')
options=('!emptydirs')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/openstack/cliff/archive/$pkgver.tar.gz")
-sha512sums=('6d34fc21d4f391da722ac3887ad6eea401481381939a89b1fe6bfd8d038ae961e80d8a3fb45c81ea0d57c301a0f1bfcdb4c864a9b6097f2d2761ca5df851b4eb')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/openstack/cliff/archive/$pkgver.tar.gz"
+ new-cmd2.patch)
+sha512sums=('6d34fc21d4f391da722ac3887ad6eea401481381939a89b1fe6bfd8d038ae961e80d8a3fb45c81ea0d57c301a0f1bfcdb4c864a9b6097f2d2761ca5df851b4eb'
+ '9998d90b3b07f624340feca9ab38cd13db789006ff5d658ceeb9b7fe8c74180ddce4e91c57c8696cff997aed390ab17df53a4840e1f02a629c3e824c5ba25c3d')
export PBR_VERSION=$pkgver
+prepare() {
+ cd cliff-$pkgver
+ patch -p1 -i ../new-cmd2.patch
+}
+
build() {
cd cliff-$pkgver
python setup.py build
Added: new-cmd2.patch
===================================================================
--- new-cmd2.patch (rev 0)
+++ new-cmd2.patch 2020-03-12 00:25:11 UTC (rev 594796)
@@ -0,0 +1,46 @@
+commit 6c1ddf273f026d9a0daff8305cd98b4516b8f447
+Author: Felix Yan <felixonmars at archlinux.org>
+Date: Thu Mar 12 08:10:53 2020 +0800
+
+ Fix compatibility with new cmd2
+
+ Change-Id: I8c926152aa43359be376ec3dea83c42ecc499e80
+
+diff --git a/cliff/interactive.py b/cliff/interactive.py
+index 4341d09..473f59a 100644
+--- a/cliff/interactive.py
++++ b/cliff/interactive.py
+@@ -175,9 +175,16 @@ class InteractiveApp(cmd2.Cmd):
+ statement.parsed.args = ' '.join(sub_argv)
+ else:
+ # cmd2 >= 0.9.1 uses shlex and gives us a Statement.
+- statement.command = cmd_name
+- statement.argv = [cmd_name] + sub_argv
+- statement.args = ' '.join(statement.argv)
++ statement = cmd2.Statement(' '.join(sub_argv),
++ raw=statement.raw,
++ command=cmd_name,
++ arg_list=sub_argv,
++ multiline_command=statement.multiline_command,
++ terminator=statement.terminator,
++ suffix=statement.suffix,
++ pipe_to=statement.pipe_to,
++ output=statement.output,
++ output_to=statement.output_to)
+ return statement
+
+ def cmdloop(self):
+diff --git a/requirements.txt b/requirements.txt
+index c5f88ce..f89f1da 100644
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -2,7 +2,8 @@
+ # of appearance. Changing the order has an impact on the overall integration
+ # process, which may cause wedges in the gate later.
+ pbr!=2.1.0,>=2.0.0 # Apache-2.0
+-cmd2>=0.8.0,!=0.8.3,<0.9.0 # MIT
++cmd2!=0.8.3,<0.9.0;python_version<'3.0' # MIT
++cmd2!=0.8.3;python_version>='3.0' # MIT
+ PrettyTable<0.8,>=0.7.2 # BSD
+ pyparsing>=2.1.0 # MIT
+ six>=1.10.0 # MIT
More information about the arch-commits
mailing list