Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions virtualenv_embedded/distutils-init.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import sys
import warnings
import imp
import importlib
import opcode # opcode is not a virtualenv module, so we can use it to find the stdlib
# Important! To work on pypy, this must be a module that resides in the
# lib-python/modified-x.y.z directory
Expand All @@ -14,7 +14,8 @@
"The virtualenv distutils package at %s appears to be in the same location as the system distutils?")
else:
__path__.insert(0, distutils_path)
real_distutils = imp.load_module("_virtualenv_distutils", None, distutils_path, ('', '', imp.PKG_DIRECTORY))
real_distutils = importlib.machinery.SourceFileLoader(
"_virtualenv_distutils", os.path.join(distutils_path + '/__init__.py')).load_module()
# Copy the relevant attributes
try:
__revision__ = real_distutils.__revision__
Expand Down