no samefile for windows python2.7

Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
Dan Ryan
2018-11-12 16:31:53 -05:00
parent 8fa4057727
commit 9eabde0bbf
+2 -1
View File
@@ -26,7 +26,8 @@ class Environment(object):
super(Environment, self).__init__()
self._modules = {'pkg_resources': pkg_resources, 'pipenv': pipenv}
self.base_working_set = base_working_set if base_working_set else BASE_WORKING_SET
self.is_venv = not os.path.samefile(os.path.abspath(str(prefix)), sys.prefix)
prefix = os.path.normcase(os.path.normpath(os.path.abspath(str(prefix))))
self.is_venv = not prefix == os.path.normcase(os.path.normpath(sys.prefix))
if not sources:
sources = []
self.sources = sources