mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-17 03:25:46 +00:00
e06ac271e0
- Add a $PKGREQ to enforce dependency on version 2.0+ of Python
18 lines
554 B
Bash
18 lines
554 B
Bash
#!/bin/sh
|
|
|
|
PATH=$PATH:/usr/local/bin
|
|
|
|
if [ "x$1" = "xINSTALL" -o "x$2" = "xINSTALL" ]; then
|
|
PYTHON_GT=`python -c 'import string, sys; \
|
|
print string.split(sys.version)[0] >= "2.0"'`
|
|
if [ "x${PYTHON_GT}" = "x1" ]; then
|
|
exit 0
|
|
else
|
|
echo "-----------------------------------------------------------"
|
|
echo "PyXML requires Python version 2.0 or greater -"
|
|
echo " please update your Python installation before proceeding."
|
|
echo "-----------------------------------------------------------"
|
|
exit 1
|
|
fi
|
|
fi
|