From 0836ceec0ba4c2a61c64999c200d022278df4401 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 24 Nov 2008 00:38:26 +0000 Subject: [PATCH] more setup.py fixed for windows build --- bindings/python/setup.py.in | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/bindings/python/setup.py.in b/bindings/python/setup.py.in index 185147f78..26867dfb9 100644 --- a/bindings/python/setup.py.in +++ b/bindings/python/setup.py.in @@ -23,12 +23,17 @@ def arch(): if platform.system() == 'Windows': # on windows, build using bjam and build an installer import shutil - os.system('bjam boost=source link=static boost-link=static release msvc-7.1') - try: - os.mkdir(r'libtorrent') - except: - pass - shutil.copyfile(r'bin\msvc-7.1\release\boost-source\link-static\threading-multi\libtorrent.pyd', r'.\libtorrent\libtorrent.pyd') + import sys + if os.system('bjam boost=source link=static boost-link=static release msvc-7.1') != 0: + print 'build failed' + sys.exit(1) + try: os.mkdir(r'build') + except: pass + try: os.mkdir(r'build\lib') + except: pass + try: os.mkdir(r'libtorrent') + except: pass + shutil.copyfile(r'bin\msvc-7.1\release\boost-source\link-static\threading-multi\libtorrent.pyd', r'.\build\lib\libtorrent.pyd') setup( name='python-libtorrent', version='@PACKAGE_VERSION@', author = 'Arvid Norberg', @@ -39,8 +44,6 @@ if platform.system() == 'Windows': platforms = 'Windows', license = 'Boost Software License - Version 1.0 - August 17th, 2003', packages = ['libtorrent'], - package_data = {'.': [r'libtorrent.pyd']}, - package_dir={'.': 'libtorrent'} ) sys.exit(0)