Esempio n. 1
0
File: test.py Progetto: Sanyam07/sdc
            File "sdc/sdc/__init__.py", line 9, in <module>
                import sdc.dict_ext
            File "sdc/sdc/dict_ext.py", line 12, in <module>
                from sdc.str_ext import string_type, gen_unicode_to_std_str, gen_std_str_to_unicode
            File "sdc/sdc/str_ext.py", line 18, in <module>
                from . import hstr_ext
        ImportError: cannot import name 'hstr_ext' from 'sdc' (sdc/sdc/__init__.py)
        """
        os.chdir(os.path.dirname(sdc_src))
        run_command(f'{develop_env_activate} && {test_script}')
        format_print('Tests for installed SDC package are PASSED')
        sys.exit(0)

    # Test conda package using conda build
    if test_mode == 'conda':
        create_conda_env(conda_activate, test_env, python, ['conda-build'])
        sdc_packages = get_sdc_build_packages(build_folder)
        for package in sdc_packages:
            if '.tar.bz2' in package:
                format_print(f'Run tests for sdc conda package: {package}')
                run_command(
                    f'{test_env_activate} && conda build --test {conda_channels} {package}'
                )
        format_print('Tests for conda packages are PASSED')
        sys.exit(0)

    # Get sdc build and test environment
    sdc_env = get_sdc_env(conda_activate, sdc_src, sdc_recipe, python, numpy,
                          conda_channels)

    # Test specified package type
Esempio n. 2
0
    if platform.system() == 'Windows':
        if build_mode != 'package':
            set_environment_variable(
                'INCLUDE', os.path.join('%CONDA_PREFIX%', 'Library',
                                        'include'))
            set_environment_variable(
                'LIB', os.path.join('%CONDA_PREFIX%', 'Library', 'lib'))

        conda_build_packages.extend([
            'conda-verify', 'vc', 'vs2015_runtime', 'vs2015_win-64',
            'pywin32=223'
        ])

    # Build Numba from master
    if use_numba_master is True:
        create_conda_env(conda_activate, build_env, python,
                         conda_build_packages)
        format_print('Start build Numba from master')
        run_command('{} && {}'.format(
            build_env_activate, ' '.join([
                'conda build --no-test', f'--python {python}',
                f'--numpy {numpy}', f'--output-folder {numba_output_folder}',
                f'{numba_conda_channels} {numba_recipe}'
            ])))
        format_print('NUMBA BUILD COMPETED')

    # Get sdc build and test environment
    sdc_env = get_sdc_env(conda_activate, sdc_src, sdc_recipe, python, numpy,
                          conda_channels)

    # Set build command
    if build_mode == 'package':