Commits

James Tocknell  committed 70074a3

Fixed vendoring imports

  • Participants
  • Parent commits b8f9f8f

Comments (0)

Files changed (2)

File venv_tools/__init__.py

 import shutil
 import warnings
 
-import ._utils as utils
+from ._utils import pathprepend, get_default_venv_builder
 
 BIN_DIR = "Scripts" if sys.platform == 'win32' else "bin"
 __version__ = "0.1"
         if self._venv_builder:
             venv = self._venv_builder(**self._kwargs)
             venv.create(self.env_dir)
-        utils.pathprepend(os.path.join(self.env_dir, BIN_DIR), "PATH")
+        pathprepend(os.path.join(self.env_dir, BIN_DIR), "PATH")
         if self._python_home is not None:
             os.environ.pop("PYTHONHOME")
         os.environ["VIRTUAL_ENV"] = self.env_dir
             ):
         self._kwargs = kwargs
         self._venv_builder = (venv_builder or
-            utils.get_default_venv_builder(use_virtualenv, path_to_python_exe))
+            get_default_venv_builder(use_virtualenv, path_to_python_exe))
         self._path_to_python_exe = path_to_python_exe
         self._kwargs["clear"] = True # needed for venv which wants to create dir
 

File venv_tools/utils.py

 import os
 import sys
 
-import ._venv_builders as venv_builders
+from ._venv_builders import VenvBuilderWithPip, VirtualenvBuilder
 
 def pathremove(dir, path):
     """
     will satisfy the requirements.
     """
     if path_to_python_exe:
-        return venv_builders.VirtualenvBuilder
+        return VirtualenvBuilder
     elif use_virtualenv:
-        return venv_builders.VirtualenvBuilder
+        return VirtualenvBuilder
     try:
         import venv
         if sys.version_info[0:2] == (3, 3):
-            return venv_builders.VenvBuilderWithPip
+            return VenvBuilderWithPip
         return venv.EnvBuilder
     except ImportError as e:
-        return venv_builders.VirtualenvBuilder
+        return VirtualenvBuilder