-from distutils.command.build_ext import build_ext
-from distutils.errors import CCompilerError, DistutilsPlatformError
-
-
-data_files = []
-documentation_path = 'docs/_build/html'
-if os.path.exists(documentation_path):
- documentation_files = []
- for fn in os.listdir(documentation_path):
- if not fn.startswith('.'):
- fn = os.path.join(documentation_path, fn)
- if os.path.isfile(fn):
- documentation_files.append(fn)
- data_files.append(('docs', documentation_files))
-
-
-def get_terminal_width():
- """Return the current terminal dimensions."""
- try:
- from struct import pack, unpack
- from fcntl import ioctl
- from termios import TIOCGWINSZ
- s = pack('HHHH', 0, 0, 0, 0)
- return unpack('HHHH', ioctl(sys.stdout.fileno(), TIOCGWINSZ, s))[1]
- except:
- return 80