Commits

Carl Meyer committed 981ab2d

Allow relative path in .virtual.conf prefix setting.

  • Participants
  • Parent commits c48e97e
  • Branches pythonv2

Comments (0)

Files changed (1)

         cfg.read(virtual_conf)
         system_site = cfg.get(
             "virtual", "include-system-site", fallback="false").lower()
+        conf_prefix = os.path.dirname(virtual_conf)
         sys_prefix = cfg.get(
-            "virtual", "prefix", fallback=os.path.dirname(virtual_conf))
+            "virtual", "prefix", fallback=conf_prefix)
+        if not os.path.isabs(sys_prefix):
+            sys_prefix = os.path.abspath(os.path.join(conf_prefix, sys_prefix))
 
         sys.prefix = sys.exec_prefix = sys_prefix