From d0183e7b6f2d2d09ea174bcee1bb24424b67f214 Mon Sep 17 00:00:00 2001 From: Dave Woodfall Date: Fri, 21 May 2021 21:32:16 +0100 Subject: python/mock: Convert python to python2. Signed-off-by: Dave Woodfall Signed-off-by: Willy Sudiarto Raharjo --- python/mock/README | 12 ++++++------ python/mock/mock.SlackBuild | 8 ++------ 2 files changed, 8 insertions(+), 12 deletions(-) (limited to 'python/mock') diff --git a/python/mock/README b/python/mock/README index 448beb6f81de..f9fa27381acc 100644 --- a/python/mock/README +++ b/python/mock/README @@ -1,9 +1,9 @@ mock (unit test library for Python 2) -mock is a library for testing in Python 2. It allows you to replace parts of -your system under test with mock objects, and to make assertions about how they -have been used. +mock is a library for testing in Python 2. It allows you to replace +parts of your system under test with mock objects, and to make +assertions about how they have been used. -IMPORTANT: For Python3 you do not need this module. Please use the standard -library instead (unittest.mock). This package contains a rolling backport of -the standard library compatible with Python 2.7. +IMPORTANT: For Python3 you do not need this module. Please use the +standard library instead (unittest.mock). This package contains a +rolling backport of the standard library compatible with Python 2.7. diff --git a/python/mock/mock.SlackBuild b/python/mock/mock.SlackBuild index c95ecb03136c..a89c2e5909c8 100644 --- a/python/mock/mock.SlackBuild +++ b/python/mock/mock.SlackBuild @@ -72,12 +72,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -python setup.py install --root=$PKG - -# Python 3 support. -if $(python3 -c 'import sys' 2>/dev/null); then - python3 setup.py install --root=$PKG -fi +python2 setup.py install --root=$PKG +python3 setup.py install --root=$PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -- cgit v1.2.3