Skip to content

Commit

Permalink
Virtual env with / (conan-io#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
lasote authored and memsharded committed Nov 3, 2016
1 parent be19210 commit 2da1835
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions conans/client/generators/virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def adjust_var_name(name):
# Allow path with spaces in non-windows platforms
if platform.system() != "Windows" and name in ["PATH", "PYTHONPATH"]:
value = ['"%s"' % v for v in value]
multiple_to_set[name] = os.pathsep.join(value)
multiple_to_set[name] = os.pathsep.join(value).replace("\\", "/")
else:
simple_to_set[name] = value

# It works in windows too using "/" and allows to use MSYS shell
simple_to_set[name] = value.replace("\\", "/")
return multiple_to_set, simple_to_set


Expand All @@ -58,7 +58,7 @@ def content(self):
all_vars = copy.copy(multiple_to_set)
all_vars.update(simple_to_set)
venv_name = os.path.basename(self.conanfile.conanfile_directory)
venv_dir = self.conanfile.conanfile_directory
venv_dir = self.conanfile.conanfile_directory.replace("\\", "/")
deactivate_lines = ["@echo off"] if platform.system() == "Windows" else []
for name in all_vars.keys():
old_value = os.environ.get(name, "")
Expand Down

0 comments on commit 2da1835

Please sign in to comment.