diff options
author | Dave Woodfall <dave@slackbuilds.org> | 2021-05-21 21:32:16 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-06-02 01:02:25 +0700 |
commit | d0183e7b6f2d2d09ea174bcee1bb24424b67f214 (patch) | |
tree | 16fb5a3b6d4f3075c363d83be5414e5fa651f3f5 /python/mock | |
parent | faa40a3410bd1f7690cf1b90594f21ced4f1efa0 (diff) |
python/mock: Convert python to python2.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/mock')
-rw-r--r-- | python/mock/README | 12 | ||||
-rw-r--r-- | python/mock/mock.SlackBuild | 8 |
2 files changed, 8 insertions, 12 deletions
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 |