python/python-magic: Autodetect python3.

It should be already available...

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2021-07-26 10:19:55 +02:00 committed by Robby Workman
parent 254c61e849
commit 35a1af63e8
2 changed files with 4 additions and 6 deletions

View file

@ -2,5 +2,4 @@ This module uses ctypes to access the libmagic file type identification
library. It makes use of the local magic database and supports both textual
and MIME-type output.
Note: To install python3 bindings pass PYTHON3=yes to the slackbuild.
# PYTHON3=yes ./python-magic.SlackBuild
python3 is an optional dependency (autodetected).

View file

@ -67,10 +67,9 @@ find -L . \
python2 setup.py install --root=$PKG
# Install for python3. Default is no.
if [ "${PYTHON3:-no}" == "yes" ]; then
rm -rf build
python3 setup.py install --root=$PKG
# Add Python3 support
if $(python3 -c 'import sys' 2>/dev/null); then
python3 setup.py install --root=$PKG
fi
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \