don't rely on setuptools for readline dependency check

This commit is contained in:
MinRK 2011-04-11 10:54:50 -07:00
parent a6ebd33613
commit 67c6025d9e

View File

@ -62,6 +62,7 @@ from setupbase import (
check_for_dependencies, check_for_dependencies,
record_commit_info, record_commit_info,
) )
from setupext.setupext import check_for_readline
isfile = os.path.isfile isfile = os.path.isfile
pjoin = os.path.join pjoin = os.path.join
@ -219,10 +220,14 @@ if 'setuptools' in sys.modules:
test='nose>=0.10.1', test='nose>=0.10.1',
) )
requires = setup_args.setdefault('install_requires', []) requires = setup_args.setdefault('install_requires', [])
if sys.platform == 'darwin': if not check_for_readline():
requires.append('readline') if sys.platform == 'darwin':
elif sys.platform.startswith('win'): requires.append('readline')
requires.append('pyreadline') elif sys.platform.startswith('win'):
requires.append('pyreadline')
else:
pass
# do we want to install readline here?
# Script to be run by the windows binary installer after the default setup # Script to be run by the windows binary installer after the default setup
# routine, to add shortcuts and similar windows-only things. Windows # routine, to add shortcuts and similar windows-only things. Windows