mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 15:53:55 -04:00
dist: ship regular "distutils" even when in PyPI "virtualenv" env
Fixes #747
This commit is contained in:
parent
6e36abf5ba
commit
b43b0c9fad
11
direct/src/dist/FreezeTool.py
vendored
11
direct/src/dist/FreezeTool.py
vendored
@ -2372,6 +2372,17 @@ class PandaModuleFinder(modulefinder.ModuleFinder):
|
||||
|
||||
path = self.path
|
||||
|
||||
if fullname == 'distutils' and hasattr(sys, 'real_prefix'):
|
||||
# The PyPI version of virtualenv inserts a special version of
|
||||
# distutils that does some bizarre stuff that won't work in our
|
||||
# deployed application. Force it to find the regular one.
|
||||
try:
|
||||
fp, fn, stuff = self.find_module('opcode')
|
||||
if fn:
|
||||
path = [os.path.dirname(fn)] + path
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Look for the module on the search path.
|
||||
for dir_path in path:
|
||||
basename = os.path.join(dir_path, name.split('.')[-1])
|
||||
|
Loading…
x
Reference in New Issue
Block a user