make setup.py print a friendly error message if it was not configured with boost.python instead of failing to build

This commit is contained in:
Arvid Norberg 2008-12-05 16:57:37 +00:00
parent a54c3fc0e7
commit da93e19c5d
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,11 @@ from distutils.core import setup, Extension
import os import os
import platform import platform
if '@BOOST_PYTHON_LIB@' == '':
print 'You need to pass --enable-python-binding to configure in order ',
print 'to properly use this setup. There is no boost.python library configured now'
sys.exit(1)
def parse_cmd(cmdline, prefix, keep_prefix = False): def parse_cmd(cmdline, prefix, keep_prefix = False):
ret = [] ret = []
for token in cmdline.split(): for token in cmdline.split():