Browse Source

deploy-ng: Use a clean sys.path for each platform

Mitchell Stokes 9 years ago
parent
commit
a03448509e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      direct/src/showutil/dist.py

+ 3 - 0
direct/src/showutil/dist.py

@@ -55,6 +55,8 @@ class build(distutils.command.build.build):
             use_wheels = True
         print("Building platforms: {}".format(','.join(platforms)))
 
+        saved_path = sys.path[:]
+
         for platform in platforms:
             builddir = os.path.join(self.build_base, platform)
 
@@ -86,6 +88,7 @@ class build(distutils.command.build.build):
                 whlfiles = {whl: zipfile.ZipFile(whl) for whl in wheelpaths}
 
                 # Add whl files to the path so they are picked up by modulefinder
+                sys.path = saved_path[:]
                 for whl in wheelpaths:
                     sys.path.insert(0, whl)