
import imp
import os
import sys
import warnings


try:

    try:
        import sitetools._startup
    except ImportError:
        
        # Pull in the sitetools that goes with this sitecustomize.
        sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

        # Let this ImportError raise.
        import sitetools._startup

except Exception as e:
    warnings.warn("Error while importing sitetools._startup: %s" % e)


# Be a good citizen and find the next sitecustomize module.
my_path = os.path.dirname(os.path.abspath(__file__))
clean_path = [x for x in sys.path if os.path.abspath(x) != my_path]
try:
    args = imp.find_module('sitecustomize', clean_path)
except ImportError:
    pass
else:
    imp.load_module('sitecustomize', *args)


import imp
import os
import sys
import warnings


try:

    try:
        import sitetools._startup
    except ImportError:
        
        # Pull in the sitetools that goes with this sitecustomize.
        sys.path.append(os.path.abspath(os.path.join(
            __file__,
            '..', '..', '..'
        )))

        # Let this ImportError raise.
        import sitetools._startup

except Exception as e:
    warnings.warn("Error while importing sitetools._startup: %s" % e)


# Be a good citizen and find the next sitecustomize module.
my_path = os.path.dirname(os.path.abspath(__file__))
clean_path = [x for x in sys.path if os.path.abspath(x) != my_path]
try:
    args = imp.find_module('sitecustomize', clean_path)
except ImportError:
    pass
else:
    imp.load_module('sitecustomize', *args)

Adjust venv_hook to work in new location
Adjust venv_hook to work in new location
  
  import imp
  import os
  import sys
  import warnings
  
  
  try:
  
      try:
          import sitetools._startup
      except ImportError:
          
          # Pull in the sitetools that goes with this sitecustomize.
-         sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+         sys.path.append(os.path.abspath(os.path.join(
+             __file__,
+             '..', '..', '..'
+         )))
  
          # Let this ImportError raise.
          import sitetools._startup
  
  except Exception as e:
      warnings.warn("Error while importing sitetools._startup: %s" % e)
  
  
  # Be a good citizen and find the next sitecustomize module.
  my_path = os.path.dirname(os.path.abspath(__file__))
  clean_path = [x for x in sys.path if os.path.abspath(x) != my_path]
  try:
      args = imp.find_module('sitecustomize', clean_path)
  except ImportError:
      pass
  else:
      imp.load_module('sitecustomize', *args)
  
Adjust venv_hook to work in new location
## Code Before:

import imp
import os
import sys
import warnings


try:

    try:
        import sitetools._startup
    except ImportError:
        
        # Pull in the sitetools that goes with this sitecustomize.
        sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

        # Let this ImportError raise.
        import sitetools._startup

except Exception as e:
    warnings.warn("Error while importing sitetools._startup: %s" % e)


# Be a good citizen and find the next sitecustomize module.
my_path = os.path.dirname(os.path.abspath(__file__))
clean_path = [x for x in sys.path if os.path.abspath(x) != my_path]
try:
    args = imp.find_module('sitecustomize', clean_path)
except ImportError:
    pass
else:
    imp.load_module('sitecustomize', *args)

## Instruction:
Adjust venv_hook to work in new location
## Code After:

import imp
import os
import sys
import warnings


try:

    try:
        import sitetools._startup
    except ImportError:
        
        # Pull in the sitetools that goes with this sitecustomize.
        sys.path.append(os.path.abspath(os.path.join(
            __file__,
            '..', '..', '..'
        )))

        # Let this ImportError raise.
        import sitetools._startup

except Exception as e:
    warnings.warn("Error while importing sitetools._startup: %s" % e)


# Be a good citizen and find the next sitecustomize module.
my_path = os.path.dirname(os.path.abspath(__file__))
clean_path = [x for x in sys.path if os.path.abspath(x) != my_path]
try:
    args = imp.find_module('sitecustomize', clean_path)
except ImportError:
    pass
else:
    imp.load_module('sitecustomize', *args)
