<commit_before>from distutils.core import setup, Extension
from distutils.sysconfig import *
import os

# Open Inventor paths and libraries:

# OS X paths by default
oivincpath = '/Library/Frameworks/Inventor.framework/Resources/include'
oivlibpath = '/Library/Frameworks/Inventor.framework/Libraries'
oivlibname = 'Coin'

# Check for "--static" option (Coin only)
if "--static" in sys.argv:
    sys.argv.remove("--static")
    libsuffix = "s"
    oivcompileargs = ['-DCOIN_NOT_DLL']
    oivlibs = ['simage1s']
else:
    libsuffix = ""
    oivcompileargs = ['-DCOIN_DLL']
    oivlibs = [ ]

# Coin environment variable?
if os.environ.get('COINDIR') is not None:
    oivincpath = os.environ.get('COINDIR') + '/include'
    oivlibpath = os.environ.get('COINDIR') + '/lib'
    if os.environ.get('windir') is not None:
        # Coin on Windows uses Coin4 rather than just Coin as library name
        oivlibname = oivlibname + '4'

# Additional libs
oivlibs += [ oivlibname + libsuffix ]
if os.environ.get('windir') is not None:
    oivlibs += [ 'Opengl32', 'Gdi32', 'User32', 'Gdiplus' ]


# numpy paths are generated automatically:
numarrayinc = os.path.join(get_python_lib(plat_specific=1), 'numpy/numarray/include')
numcoreinc  = os.path.join(get_python_lib(plat_specific=1), 'numpy/core/include')

module1 = Extension('inventor',
                    include_dirs = [numarrayinc, numcoreinc, oivincpath],
                    libraries = oivlibs,
                    library_dirs = [oivlibpath],
                    extra_compile_args = oivcompileargs,
                    sources = ['src/PyInventor.cpp', 
                               'src/PySceneManager.cpp', 
                               'src/PySceneObject.cpp', 
                               'src/PySensor.cpp'])

setup (name = 'PyInventor',
       version = '1.0',
       description = 'Python integration for Open Inventor toolkit',
       author = '<NAME>',
       author_email = '',
       url = 'http://thehubbit.github.io/PyInventor/',
       long_description = '''Python integration for Open Inventor toolkit.''',
       ext_modules = [module1],
       package_dir={'PyInventor': 'packages'},
       packages=['PyInventor', 'PyInventor.QtInventor'])<commit_msg>Added debug option.<commit_after>from distutils.core import setup, Extension
from distutils.sysconfig import *
import os

# Open Inventor paths and libraries:

# OS X paths by default
oivincpath = '/Library/Frameworks/Inventor.framework/Resources/include'
oivlibpath = '/Library/Frameworks/Inventor.framework/Libraries'
oivlibname = 'Coin'

oivlibs = []
oivcompileargs = []
libsuffix = ''

# Check for '--debug' option
if '--debug' in sys.argv:
    sys.argv.remove('--debug')
    if os.environ.get('windir') is not None:
        libsuffix += 'd'
        oivcompileargs.append('/MDd')

# Check for '--static' option
if '--static' in sys.argv:
    sys.argv.remove('--static')
    libsuffix = 's' + libsuffix
    oivcompileargs.append('-DCOIN_NOT_DLL')
    if os.environ.get('windir') is not None:
        oivlibs.append('simage1' + libsuffix)
else:
    oivcompileargs.append('-DCOIN_DLL')

# Coin environment variable?
if os.environ.get('COINDIR') is not None:
    oivincpath = os.environ.get('COINDIR') + '/include'
    oivlibpath = os.environ.get('COINDIR') + '/lib'

# Additional libs
if os.environ.get('windir') is not None:
    oivlibs += ['Opengl32', 'Gdi32', 'User32', 'Gdiplus']
else:
    oivlibs += [oivlibname + libsuffix]


# numpy paths are generated automatically:
numarrayinc = os.path.join(get_python_lib(plat_specific=1), 'numpy/numarray/include')
numcoreinc  = os.path.join(get_python_lib(plat_specific=1), 'numpy/core/include')

module1 = Extension('inventor',
                    include_dirs = [numarrayinc, numcoreinc, oivincpath],
                    libraries = oivlibs,
                    library_dirs = [oivlibpath],
                    extra_compile_args = oivcompileargs,
                    sources = ['src/PyInventor.cpp', 
                               'src/PySceneManager.cpp', 
                               'src/PySceneObject.cpp', 
                               'src/PySensor.cpp'])

setup (name = 'PyInventor',
       version = '1.0',
       description = 'Python integration for Open Inventor toolkit',
       author = '<NAME>',
       author_email = '',
       url = 'http://thehubbit.github.io/PyInventor/',
       long_description = '''Python integration for Open Inventor toolkit.''',
       ext_modules = [module1],
       package_dir={'PyInventor': 'packages'},
       packages=['PyInventor', 'PyInventor.QtInventor'])
{'fraction_non_alphanumeric': 0.1324330211282945, 'fraction_numerical': 0.006098889130908299, 'mean_word_length': 2.782537067545305, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '429936', 'n_tokens_mistral': 1519, 'n_tokens_neox': 1479, 'n_words': 312}