AppVeyor: Use only precompiled Python modules (#375)

This commit is contained in:
Paul I 2018-03-19 23:26:46 +03:00 committed by xarkes
parent bba02f4b9d
commit 2c726205c4

View File

@ -60,8 +60,12 @@ after_build:
- ps: $env:py_url = "https://www.python.org/ftp/python/${env:py_version}/python-${env:py_version}-embed-${env:py_platform}.zip"
- cmd: powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget %py_url% -OutFile python_embed.zip; Expand-Archive .\python_embed.zip -DestinationPath .\python_embed; Remove-Item -Path .\python_embed\vcruntime140.dll"
- cmd: powershell -Command "Expand-Archive .\python_embed\python36.zip -DestinationPath .\%ARTIFACT_PATH%\python36"
- cmd: python -m pip install -I -t "%ARTIFACT_PATH%\python36\site-packages" jupyter
- cmd: rd /s /q "%ARTIFACT_PATH%\python36\lib2to3"
- cmd: python -m pip install -I --no-compile -t "%ARTIFACT_PATH%\python36\site-packages" jupyter
- cmd: rd /s /q "%ARTIFACT_PATH%\python36\site-packages\test"
- cmd: for /d %%p in ("%ARTIFACT_PATH%\python36\site-packages\*.dist-info" "%ARTIFACT_PATH%\python36\site-packages\*.egg-info") do rd /s /q "%%p"
- cmd: python -O -m compileall -b -q "%ARTIFACT_PATH%\python36\site-packages"
- cmd: del /s "%ARTIFACT_PATH%\python36\site-packages\*.py"
- cmd: copy python_embed\*.pyd "%ARTIFACT_PATH%\python36\" && copy python_embed\*.dll "%ARTIFACT_PATH%\"
- cmd: powershell -Command "[System.IO.File]::WriteAllLines(\"%ARTIFACT_PATH%\python36._pth\", \"python36`r`npython36\site-packages\")"