get mingw32 to work

This commit is contained in:
Henning Peters 2015-12-22 23:25:38 +01:00
parent a404bfec38
commit 0e321a7105
2 changed files with 18 additions and 4 deletions

View File

@ -17,8 +17,15 @@ def migrate(path):
def link(package, path): def link(package, path):
if os.path.exists(path): if os.path.exists(path):
os.unlink(path) if os.path.isdir(path):
os.symlink(package.dir_path('data'), path) shutil.rmtree(path)
else:
os.unlink(path)
if not hasattr(os, 'symlink'): # not supported by win+py27
shutil.copytree(package.dir_path('data'), path)
else:
os.symlink(package.dir_path('data'), path)
@plac.annotations( @plac.annotations(

View File

@ -2,14 +2,21 @@ param (
[string]$python = $(throw "-python is required."), [string]$python = $(throw "-python is required."),
[string]$install_mode = $(throw "-install_mode is required."), [string]$install_mode = $(throw "-install_mode is required."),
[string]$pip_date [string]$pip_date
[string]$compiler
) )
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
if(!(Test-Path -Path ".build")) if(!(Test-Path -Path ".build"))
{ {
virtualenv .build --python $python virtualenv .build --system-site-packages --python $python
} }
if($compiler)
{
"[build]`r`ncompiler=$compiler" | Out-File .\.build\Lib\distutils\distutils.cfg
}
.build\Scripts\activate.ps1 .build\Scripts\activate.ps1
python build.py prepare $pip_date python build.py prepare $pip_date