more setup.py fixed for windows build

This commit is contained in:
Arvid Norberg 2008-11-24 00:38:26 +00:00
parent 86f2365be4
commit 0836ceec0b
1 changed files with 11 additions and 8 deletions

View File

@ -23,12 +23,17 @@ def arch():
if platform.system() == 'Windows': if platform.system() == 'Windows':
# on windows, build using bjam and build an installer # on windows, build using bjam and build an installer
import shutil import shutil
os.system('bjam boost=source link=static boost-link=static release msvc-7.1') import sys
try: if os.system('bjam boost=source link=static boost-link=static release msvc-7.1') != 0:
os.mkdir(r'libtorrent') print 'build failed'
except: sys.exit(1)
pass try: os.mkdir(r'build')
shutil.copyfile(r'bin\msvc-7.1\release\boost-source\link-static\threading-multi\libtorrent.pyd', r'.\libtorrent\libtorrent.pyd') 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', setup( name='python-libtorrent',
version='@PACKAGE_VERSION@', version='@PACKAGE_VERSION@',
author = 'Arvid Norberg', author = 'Arvid Norberg',
@ -39,8 +44,6 @@ if platform.system() == 'Windows':
platforms = 'Windows', platforms = 'Windows',
license = 'Boost Software License - Version 1.0 - August 17th, 2003', license = 'Boost Software License - Version 1.0 - August 17th, 2003',
packages = ['libtorrent'], packages = ['libtorrent'],
package_data = {'.': [r'libtorrent.pyd']},
package_dir={'.': 'libtorrent'}
) )
sys.exit(0) sys.exit(0)