File: docs_common.py

package info (click to toggle)
cclib-data 1.6.2-2
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm, bullseye, sid
  • size: 87,912 kB
  • sloc: python: 16,440; sh: 131; makefile: 79; cpp: 31
file content (16 lines) | stat: -rw-r--r-- 557 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- coding: utf-8 -*-

from __future__ import print_function

import os
import sys


def check_cclib(cclib):
    """Make sure we are importing code from a subdirectory, which should exist
    and should have been updated just before running this script. Note that
    this script does not assume any version in the module and just takes
    what it finds... so an appropriate checkout should be done first."""
    if cclib.__file__[:len(os.getcwd())] != os.getcwd():
        print("Do not seem to be importing from current directory")
        sys.exit(1)