2015-12-16 17:11:54 +00:00
|
|
|
param (
|
|
|
|
[string]$python = $(throw "-python is required."),
|
|
|
|
[string]$install_mode = $(throw "-install_mode is required."),
|
2015-12-22 22:27:34 +00:00
|
|
|
[string]$pip_date,
|
2015-12-22 22:25:38 +00:00
|
|
|
[string]$compiler
|
2015-12-16 17:11:54 +00:00
|
|
|
)
|
2015-12-19 09:21:32 +00:00
|
|
|
|
|
|
|
$ErrorActionPreference = "Stop"
|
2015-12-22 22:25:38 +00:00
|
|
|
|
2015-12-16 17:11:54 +00:00
|
|
|
if(!(Test-Path -Path ".build"))
|
|
|
|
{
|
2015-12-22 23:12:28 +00:00
|
|
|
if($compiler -eq "mingw32")
|
|
|
|
{
|
|
|
|
virtualenv .build --system-site-packages --python $python
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
virtualenv .build --python $python
|
|
|
|
}
|
|
|
|
|
2015-12-22 22:41:37 +00:00
|
|
|
if($compiler)
|
|
|
|
{
|
|
|
|
"[build]`r`ncompiler=$compiler" | Out-File -Encoding ascii .\.build\Lib\distutils\distutils.cfg
|
|
|
|
}
|
2015-12-22 22:25:38 +00:00
|
|
|
}
|
|
|
|
|
2015-12-16 17:11:54 +00:00
|
|
|
.build\Scripts\activate.ps1
|
|
|
|
|
2015-12-18 16:47:06 +00:00
|
|
|
python build.py prepare $pip_date
|
|
|
|
python build.py $install_mode
|
|
|
|
python build.py test
|
2015-12-16 18:13:36 +00:00
|
|
|
exit $LASTEXITCODE
|