我有一个Python扩展,需要在基于Windows的Appveyor持续集成服务上针对PyPy解释器进行编译。如何在该环境中获得PyPy?
答案 0 :(得分:9)
将此PowerShell命令添加到构建的“安装”阶段:
(New-Object Net.WebClient).DownloadFile('https://bitbucket.org/pypy/pypy/downloads/pypy3-2.4.0-win32.zip', "$env:appveyor_build_folder\pypy3-2.4.0-win32.zip")
7z x pypy3-2.4.0-win32.zip | Out-Null
$env:path = "$env:appveyor_build_folder\pypy3-2.4.0-win32;$env:path"
然后,您可以从构建中的任何位置调用pypy.exe
。