1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-09-28 22:15:23 +08:00
bacpypes/check_install.sh
2022-12-30 12:06:05 -05:00

24 lines
429 B
Bash
Executable File

#!/bin/bash
for version in 2.7 3.4 3.5 3.6 3.7 3.8 3.9 3.10;
do
if [ -a "`which python$version`" ]; then
python$version << EOF
import sys
python_version = "%d.%d.%d" % sys.version_info[:3]
try:
import bacpypes
print("%s: %s @ %s" %(
python_version,
bacpypes.__version__, bacpypes.__file__,
))
except ImportError:
print("%s: not installed" % (
python_version,
))
EOF
fi
done