From c16c612eae253ef4ce48517d738e532556b83ba9 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 17 May 2016 01:04:12 -0400 Subject: [PATCH] fix python build on appveyor (#736) fix python build on appveyor --- appveyor.yml | 20 +++++++++----------- bindings/python/test.py | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c6ffd715e..5bf4701be 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,6 +12,7 @@ environment: compiler: msvc-14.0 model: 64 sim: 1 + python: 1 linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2015\\lib64"' include: '"c:\\openssl-1.0.1p-vs2015\\include"' - variant: test_debug @@ -22,13 +23,14 @@ environment: - variant: test_release compiler: msvc-14.0 model: 64 - linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2015\\lib"' + python: 1 + linkflags: '"/LIBPATH:C:\\openssl-1.0.1p-vs2015\\lib64"' include: '"c:\\openssl-1.0.1p-vs2015\\include"' - variant: test_debug compiler: gcc model: 64 + linkflags: '"-LC:\\OpenSSL-Win64\\lib64"' include: '"c:\\OpenSSL-Win64\\include"' - linkflags: '"-LC:\\OpenSSL-Win64\\lib"' install: - if defined sim ( git submodule update --init --recursive ) @@ -54,7 +56,7 @@ install: - echo %BOOST_ROOT% - echo %BOOST_BUILD_PATH% - set PATH=%PATH%;%BOOST_BUILD_PATH%\src\engine\bin.ntx86 -- ps: '"using msvc : 14.0 ;`nusing gcc : : : -std=c++11 ;`n" | Set-Content $env:HOMEDRIVE\$env:HOMEPATH\user-config.jam' +- ps: '"using msvc : 14.0 ;`nusing gcc : : : -std=c++11 ;`nusing python : 3.5 : c:\\Python35-x64 : c:\\Python35-x64\\include : c:\\Python35-x64\\libs ;`n" | Set-Content $env:HOMEDRIVE\$env:HOMEPATH\user-config.jam' - type %HOMEDRIVE%%HOMEPATH%\user-config.jam - cd %ROOT_DIRECTORY% - set PATH=c:\msys64\mingw64\bin;%PATH% @@ -79,9 +81,8 @@ build_script: # python binding - cd %ROOT_DIRECTORY%\bindings\python -# 64 bit python module builds don't work -- if %model% == 32 ( b2.exe --hash -j2 %compiler% address-model=%model% stage_module install-dependencies=on variant=%variant% libtorrent-link=shared linkflags=%linkflags% include=%include% ) -- if defined python_package ( python setup.py --bjam bdist_msi ) +# we use 64 bit python builds +- if defined python ( b2.exe --hash -j2 %compiler% address-model=%model% stage_module install-dependencies=on variant=%variant% libtorrent-link=shared linkflags=%linkflags% include=%include% ) # simulations - if defined sim ( @@ -94,11 +95,8 @@ test_script: # mingw tests crash currently. needs resolving - if not %compiler% == gcc ( b2.exe --hash -j2 address-model=%model% win-tests %compiler% variant=%variant% link=shared linkflags=%linkflags% include=%include% ) - cd %ROOT_DIRECTORY%\bindings\python -# 64 bit python module builds don't work -- if %model% == 32 ( python test.py ) +# we use 64 bit python build +- if defined python ( c:\Python35-x64\python.exe test.py ) - cd %ROOT_DIRECTORY%\simulation - if defined sim ( b2.exe --hash -j2 link=shared crypto=built-in %compiler% address-model=%model% ) -artifacts: - - path: bindings\python\dist\*.msi - name: python-binding-win32 diff --git a/bindings/python/test.py b/bindings/python/test.py index be1677ee1..f3427327f 100644 --- a/bindings/python/test.py +++ b/bindings/python/test.py @@ -84,7 +84,7 @@ class test_torrent_info(unittest.TestCase): idx = 0 expected = ['bar.txt', 'var.txt'] for f in files: - print f.path + print(f.path) self.assertEqual(os.path.split(f.path)[1], expected[idx]) self.assertEqual(os.path.split(f.path)[0], os.path.join('temp', 'foo'))