Simplify option handling in create_venv().

See #463.
This commit is contained in:
Florian Bruhin 2015-01-23 11:56:44 +01:00
parent 2264b55e92
commit 907440d12c

View File

@ -142,21 +142,14 @@ def link_pyqt():
def create_venv(): def create_venv():
"""Create a new venv.""" """Create a new venv."""
utils.print_title("Creating venv") utils.print_title("Creating venv")
system_site_packages = True system_site_packages = True
if os.name == 'nt':
clear = False symlinks = False
if g_args.clear or g_args.force: else:
clear = True symlinks = True
clear = g_args.clear or g_args.force
upgrade = False
if g_args.upgrade:
upgrade = True
symlinks = False if os.name == 'nt' else True
builder = venv.EnvBuilder(system_site_packages=system_site_packages, builder = venv.EnvBuilder(system_site_packages=system_site_packages,
clear=clear, upgrade=upgrade, clear=clear, upgrade=g_args.upgrade,
symlinks=symlinks, with_pip=True) symlinks=symlinks, with_pip=True)
builder.create(g_path) builder.create(g_path)