@REM We cannot run this script until the conda PATH bug is
@REM released and in use (conda 4.6.5).
pushd %TEMP%
conda create -p %TMP%\_py27_numba_bug -c local python=2.7 numba=0.42 -y
call activate %TMP%\_py27_numba_bug
conda info
%PYTHON% --version
set fname="aot.py"
del %fname%
del test_mod.pyd

@echo "" > %fname%
@echo from numba.pycc import CC >> %fname%
@echo import math >> %fname%
@echo cc = CC('test_mod') >> %fname%
@echo @cc.export('func', 'f8(f8)') >> %fname%
@echo def foo(x): >> %fname%
@echo     return math.cos(x) + math.sin(x) >> %fname%
@echo if __name__ == '__main__': >> %fname%
@echo    cc.compile() >> %fname%

%PYTHON% %fname%
%PYTHON% -c "import test_mod"
