2012-12-31 18:13:28 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
"""Script to verify required/optional dependencies are installed."""
|
|
|
|
|
|
|
|
import sys
|
|
|
|
errors = 0
|
|
|
|
|
|
|
|
try:
|
|
|
|
import django
|
|
|
|
except ImportError:
|
|
|
|
print "Could not import Django. This is a required package for Binder.\n"
|
|
|
|
errors += 1
|
|
|
|
|
|
|
|
try:
|
|
|
|
import dns
|
|
|
|
except ImportError:
|
|
|
|
print "Could not import dns. This is a required module for Binder."
|
|
|
|
print "Package is typically called 'python-dnspython.'\n"
|
|
|
|
errors += 1
|
|
|
|
|
2014-01-05 22:50:13 +00:00
|
|
|
try:
|
|
|
|
import pybindxml
|
|
|
|
except ImportError:
|
|
|
|
print "Could not import pybindxml. This is a required module for Binder.\n"
|
|
|
|
errors += 1
|
|
|
|
|
2012-12-31 18:13:28 +00:00
|
|
|
try:
|
|
|
|
import flup
|
|
|
|
except ImportError:
|
|
|
|
print "Could not import flup. This is an optional module if you intend to run Binder under fastcgi."
|
|
|
|
print "Package is typically called 'python-flup.'\n"
|
|
|
|
|
|
|
|
if errors:
|
|
|
|
print "Critical missing packages found: %d.\n" % errors
|
|
|
|
sys.exit(errors)
|
|
|
|
else:
|
|
|
|
print "All required packages found!"
|