#----------------------------------------------------------------------------- # Copyright (c) 2013, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- # Test standard module sysconfig (new in Python 2.7 and Python 3.2) import os import sys import sysconfig config_h = sysconfig.get_config_h_filename() print('pyconfig.h: ' + config_h) files = [config_h] # On Windows Makefile does not exist. if not sys.platform.startswith('win'): try: get_makefile_filename = sysconfig.get_makefile_filename except AttributeError: # In Python 2.7, get_makefile_filename was private get_makefile_filename = sysconfig._get_makefile_filename makefile = get_makefile_filename() print('Makefile: ' + makefile) files.append(makefile) for f in files: if not os.path.exists(f): raise SystemExit('File does not exist: %s' % f) print 'okay'