# HG changeset patch # User ymh # Date 1357724244 -3600 # Node ID 74ec1c2f245c42730e4636ec90f5618d7290a2f5 # Parent 509085ffbce6ff0115aa2f15d1e1f0b1451e86d6 Correct virtuel_env creation. Problem with tmpdir in extra_env, end extra_env null diff -r 509085ffbce6 -r 74ec1c2f245c virtualenv/res/lib/lib_create_env.py --- a/virtualenv/res/lib/lib_create_env.py Tue Jan 08 18:10:38 2013 +0100 +++ b/virtualenv/res/lib/lib_create_env.py Wed Jan 09 10:37:24 2013 +0100 @@ -302,9 +302,9 @@ ignore_packages = [] if system_str == 'Windows': - default_install_options = {'method': 'easy_install', 'option_str': None, 'dict_extra_env': None} + default_install_options = {'method': 'easy_install', 'option_str': None, 'dict_extra_env': {}} else: - default_install_options = {'method': 'pip', 'option_str': None, 'dict_extra_env': None} + default_install_options = {'method': 'pip', 'option_str': None, 'dict_extra_env': {}} if options.ignore_packages : ignore_packages = options.ignore_packages.split(",") @@ -320,6 +320,9 @@ method = install_options.get('method', default_install_options['method']) option_str = install_options.get('option_str', default_install_options['option_str']) extra_env = install_options.get('dict_extra_env', default_install_options['dict_extra_env']) + if not extra_env: + extra_env = {} + if 'TMPDIR' not in extra_env: extra_env['TMPDIR'] = os.path.abspath(tmp_dir) #isinstance(lst, (list, tuple))