python-cliff: update to 3.10.1

This commit is contained in:
Mehdi Chinoune
2022-02-20 08:14:57 +01:00
parent a015a80bb8
commit a84e77d796
3 changed files with 14 additions and 57 deletions

View File

@@ -1,12 +0,0 @@
--- cliff-3.1.0/requirements.txt 2020-03-27 05:38:14.000000000 +0900
+++ patched-cliff-3.1.0/requirements.txt 2020-04-07 23:06:36.679325600 +0900
@@ -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

View File

@@ -1,22 +0,0 @@
--- cliff-3.1.0/cliff/interactive.py 2020-03-27 05:38:14.000000000 +0900
+++ patched-cliff-3.1.0/cliff/interactive.py 2020-04-07 23:08:05.421503100 +0900
@@ -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):

View File

@@ -6,15 +6,15 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=3.1.0
pkgrel=2
pkgver=3.10.1
pkgrel=1
pkgdesc="Command Line Interface Formulation Framewor (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url='https://docs.openstack.org/cliff/latest/'
license=('Apache')
depends=("${MINGW_PACKAGE_PREFIX}-python-six"
"${MINGW_PACKAGE_PREFIX}-python-pbr"
depends=("${MINGW_PACKAGE_PREFIX}-python-pbr"
"${MINGW_PACKAGE_PREFIX}-python-autopage"
"${MINGW_PACKAGE_PREFIX}-python-cmd2"
"${MINGW_PACKAGE_PREFIX}-python-prettytable"
"${MINGW_PACKAGE_PREFIX}-python-pyparsing"
@@ -28,12 +28,8 @@ makedepends=('git'
# "${MINGW_PACKAGE_PREFIX}-python-oslosphinx"
# "${MINGW_PACKAGE_PREFIX}-python-testscenarios")
options=('staticlibs' 'strip' '!debug')
source=("${_realname}-${pkgver}.tar.gz::https://github.com/openstack/cliff/archive/${pkgver}.tar.gz"
"01-requirements-cmd2.patch"
"02-cmd2-interactive.py.patch")
sha256sums=('1fc2631b980f1a0a78c42f4f933d47f7220dd441b5da6946362020a590e93f32'
'52fea9bc186ce7e9f13aff719080c4392ce17ebbae6910ac218f08c7d16515ba'
'2d40a800084ebf4958f7c6d81ae7a4951b864481de8dfd17eb48343de3c0baed')
source=("${_realname}-${pkgver}.tar.gz::https://github.com/openstack/cliff/archive/${pkgver}.tar.gz")
sha256sums=('cc79ee488cbf2e9bb45486e09fcb25b0e099b9f6e00211cb9f28cb68d38e6da7')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
@@ -56,36 +52,31 @@ del_file_exists() {
prepare() {
cd "${srcdir}"/${_realname}-${pkgver}
# https://git.archlinux.org/svntogit/community.git/tree/trunk/new-cmd2.patch?h=packages/python-cliff
apply_patch_with_msg \
01-requirements-cmd2.patch \
02-cmd2-interactive.py.patch
}
build() {
msg "Python build for ${CARCH}"
msg "Python build for ${MSYSTEM}"
rm -rf python-build-${CARCH} | true
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
rm -rf python-build-${MSYSTEM} | true
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
export PBR_VERSION=${pkgver}
cd "${srcdir}/python-build-${CARCH}"
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python setup.py build
}
#check() {
# msg "Python test for ${CARCH}"
# cd "${srcdir}/python-build-${CARCH}"
# msg "Python test for ${MSYSTEM}"
# cd "${srcdir}/python-build-${MSYSTEM}"
# PYTHON=${MINGW_PREFIX}/bin/python3 \
# ${MINGW_PREFIX}/bin/python setup.py testr
#}
package() {
cd "${srcdir}/python-build-${CARCH}"
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build