| 1 |
# -*- coding: utf-8 -*- |
| 2 |
|
| 3 |
from __future__ import print_function |
| 4 |
|
| 5 |
import os |
| 6 |
import sys |
| 7 |
|
| 8 |
|
| 9 |
def check_cclib(cclib): |
| 10 |
"""Make sure we are importing code from a subdirectory, which should exist |
| 11 |
and should have been updated just before running this script. Note that |
| 12 |
this script does not assume any version in the module and just takes |
| 13 |
what it finds... so an appropriate checkout should be done first.""" |
| 14 |
if cclib.__file__[:len(os.getcwd())] != os.getcwd(): |
| 15 |
print("Do not seem to be importing from current directory") |
| 16 |
sys.exit(1) |