<commit_before>#!/usr/bin/env python

import os, sys
from glob import glob
import shutil

def configuration(parent_package='',parent_path=None):
    try:
        import Numeric
    except ImportError,msg:
        print msg
        print 'Working Numeric is required to build scipy_base'
        return {}

    from scipy_distutils.core import Extension
    from scipy_distutils.misc_util import get_path,default_config_dict,dot_join
    from scipy_distutils.misc_util import get_path,default_config_dict,\
         dot_join,SourceGenerator

    package = 'scipy_base'
    local_path = get_path(__name__,parent_path)
    config = default_config_dict(package,parent_package)

    # extra_compile_args -- trying to find something that is binary compatible
    #                       with msvc for returning Py_complex from functions
    extra_compile_args=[]
    
    # fastumath module
    # scipy_base.fastumath module
    umath_c_sources = ['fastumathmodule.c',
                       'fastumath_unsigned.inc','fastumath_nounsigned.inc']
    umath_c_sources = [os.path.join(local_path,x) for x in umath_c_sources]
    umath_c = SourceGenerator(func = None,
                              target = os.path.join(local_path,'fastumathmodule.c'),
                              sources = umath_c_sources)
    sources = [umath_c, os.path.join(local_path,'isnan.c')]
    define_macros = []
    if sys.byteorder == "little":
        define_macros.append(('USE_MCONF_LITE_LE',None))
    else:
        define_macros.append(('USE_MCONF_LITE_BE',None))
    ext = Extension(dot_join(package,'fastumath'),sources,
                    define_macros = define_macros,
                    extra_compile_args=extra_compile_args,
                    depends = umath_c_sources)
    config['ext_modules'].append(ext)
 <commit_msg>Raise NumericNotFoundError when Numeric is not found.<commit_after>#!/usr/bin/env python

import os, sys
from glob import glob
import shutil

def configuration(parent_package='',parent_path=None):
    from scipy_distutils.system_info import get_info, NumericNotFoundError
    from scipy_distutils.core import Extension
    from scipy_distutils.misc_util import get_path,default_config_dict,dot_join
    from scipy_distutils.misc_util import get_path,default_config_dict,\
         dot_join,SourceGenerator

    package = 'scipy_base'
    local_path = get_path(__name__,parent_path)
    config = default_config_dict(package,parent_package)

    numpy_info = get_info('numpy')
    if not numpy_info:
        raise NumericNotFoundError, NumericNotFoundError.__doc__

    # extra_compile_args -- trying to find something that is binary compatible
    #                       with msvc for returning Py_complex from functions
    extra_compile_args=[]
    
    # fastumath module
    # scipy_base.fastumath module
    umath_c_sources = ['fastumathmodule.c',
                       'fastumath_unsigned.inc','fastumath_nounsigned.inc']
    umath_c_sources = [os.path.join(local_path,x) for x in umath_c_sources]
    umath_c = SourceGenerator(func = None,
                              target = os.path.join(local_path,'fastumathmodule.c'),
                              sources = umath_c_sources)
    sources = [umath_c, os.path.join(local_path,'isnan.c')]
    define_macros = []
    if sys.byteorder == "little":
        define_macros.append(('USE_MCONF_LITE_LE',None))
    else:
        define_macros.append(('USE_MCONF_LITE_BE',None))
    ext = Extension(dot_join(package,'fastumath'),sources,
                    define_macros = define_macros,
                    extra_compile_args=extra_compile_args,
                    depends = umath_c_sources)
    config['ext_modules'].append(ext)
 
{'fraction_non_alphanumeric': 0.08337845154304277, 'fraction_numerical': 0.0, 'mean_word_length': 2.977395048439182, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, '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': '6588576', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1122, 'n_words': 209}