fix python build on appveyor (#736)

fix python build on appveyor
This commit is contained in:
Arvid Norberg 2016-05-17 01:04:12 -04:00
parent 87f07aaf1e
commit c16c612eae
2 changed files with 10 additions and 12 deletions

View File

@ -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 : : : <cxxflags>-std=c++11 ;`n" | Set-Content $env:HOMEDRIVE\$env:HOMEPATH\user-config.jam'
- ps: '"using msvc : 14.0 ;`nusing gcc : : : <cxxflags>-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

View File

@ -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'))