[Appveyor] Switch to Python 3.6

- Change build from Python 2.7 to 3.6 64-bit.
 - Specify py36 for tox since using py3 will choose latest py3 e.g. 3.7!
 - Use python 3.6 libtorrent.pyd build
 - Use pre-installed OpenSSL 1.1 (matches libtorrent build)
 - Add python version output to tox.ini for debugging.
This commit is contained in:
Calum Lind 2019-05-22 18:23:30 +01:00
parent 7e3692bb5a
commit a3b6d8d8e5
2 changed files with 15 additions and 43 deletions

View File

@ -1,66 +1,36 @@
environment:
PYTHON_VERSION: "2.7.x"
PYTHON_ARCH: "32"
PYTHON_VERSION: 3.6
PYTHON_ARCH: 64
PYTHON: "C:\\Python36-x64"
APPVEYOR_SAVE_CACHE_ON_ERROR: true
matrix:
- TOXENV: py27
- PYTHON_VERSION: "2.7.x"
- TOXENV: py36
pull_requests:
do_not_increment_build_number: true
install:
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
# If there is a newer build queued for same PR, cancel this one. Credit: JuliaLang devs
- ps:
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
- "python -m pip install --upgrade pip"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "python -VV"
- if defined TOXENV (
pip install tox tox_venv
python -m pip install tox tox_venv
) else (
python -m pip install -rrequirements.txt pygame bbfreeze pefile
)
- if not defined TOXENV (
pip install
-rrequirements.txt
pygame
bbfreeze
pefile
)
- echo "Installing openssl...."
- if not exist openssl-1.1.0f-vs2008.7z (
echo "Downloading openssl...."
& appveyor-retry appveyor DownloadFile "https://www.npcglib.org/~stathis/downloads/openssl-1.1.0f-vs2008.7z"
)
- "7z x -oc:\\ -aoa openssl-1.1.0f-vs2008.7z"
- "rename c:\\openssl-1.1.0f-vs2008 openssl-1.1"
- "copy c:\\openssl-1.1\\bin\\libsslMD.dll c:\\openssl-1.1\\bin\\libssl-1_1.dll"
- "copy c:\\openssl-1.1\\bin\\libcryptoMD.dll c:\\openssl-1.1\\bin\\libcrypto-1_1.dll"
- echo "Installing libtorrent...."
- if not exist libtorrent.pyd (
echo "Downloading libtorrent...."
& appveyor-retry appveyor DownloadFile "https://github.com/doadin/libtorrent/releases/download/1.1.7.test/libtorrent.pyd"
)
- "copy /Y libtorrent.pyd c:\\Python27\\Lib\\site-packages\\libtorrent.pyd"
- "SET PATH=%TOXENV%;%PYTHON%;%PYTHON%\\Scripts;c:\\openssl-1.1\\bin;C:\\Program Files (x86)\\NSIS;%PATH%"
- "python --version"
- 'python -c "import struct; print(struct.calcsize(\"P\") * 8)"'
- 'python -c "import libtorrent; print(libtorrent.__version__)"'
- "SET PATH=C:\\OpenSSL-v11-Win64\\bin;%PATH%"
- openssl version -v
- python -m pip install deluge-libtorrent
- 'python -c "import libtorrent; print(libtorrent.__version__)"'
cache:
- openssl-1.1.0f-vs2008.7z
- '%LOCALAPPDATA%\pip\cache'
- libtorrent.pyd
build: false
@ -71,6 +41,7 @@ test_script:
# - if not defined TOXENV python setup.py build && python setup.py install
# - cd %APPVEYOR_BUILD_FOLDER%\\packaging\\win32
# - if not defined TOXENV deluge-bbfreeze.py debug
# - "SET PATH=C:\\Program Files (x86)\\NSIS;%PATH%"
# - if not defined TOXENV makensis deluge-win32-installer.nsi
# - if not defined TOXENV 7z a deluge-win32.zip build-win32 "-x!*.exe"

View File

@ -57,6 +57,7 @@ setenv =
sitepackages = True
deps = {[basetests]deps}
commands =
python -VV
python -c "import libtorrent as lt; print(lt.__version__)"
pytest -m "not (todo or gtkui or security)" deluge/tests