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

This commit is contained in:
Mitchell Stokes 2017-01-07 10:21:31 -08:00
parent fff8c82d7c
commit a03448509e

View File

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