python/mock: Convert python to python2.

Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Dave Woodfall 2021-05-21 21:32:16 +01:00 committed by Willy Sudiarto Raharjo
parent faa40a3410
commit d0183e7b6f
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
2 changed files with 8 additions and 12 deletions

View File

@ -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.

View File

@ -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