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