import os import sys import re import distutils.util from distutils.sysconfig import get_config_var, get_config_vars from distutils.command.config import config from glob import glob from os.path import join from stat import ST_MTIME def check_packages(packages, msg, include_ase, import_numpy): """Check the python version and required extra packages If ASE is not installed, the `packages` list is extended with the ASE modules if they are found.""" if sys.version_info < (2, 3, 0, 'final', 0): raise SystemExit('Python 2.3.1 or later is required!') if import_numpy: try: import numpy except ImportError: raise SystemExit('numpy is not installed!') else: msg += ['* numpy is not installed.',