diff options
author | J. Goutin <JGoutin@users.noreply.github.com> | 2016-05-02 20:21:49 +0200 |
---|---|---|
committer | J. Goutin <JGoutin@users.noreply.github.com> | 2016-05-02 20:21:49 +0200 |
commit | 144f72286d67f8e0368333bf1c3115ebce18c374 (patch) | |
tree | 415a7b320f4cc8a6f9bb3aabccca0cac71786a09 | |
parent | 28ef4014b03a6d1b2428def3bb78e665679a5b12 (diff) | |
download | external_python_setuptools-144f72286d67f8e0368333bf1c3115ebce18c374.tar.gz external_python_setuptools-144f72286d67f8e0368333bf1c3115ebce18c374.tar.bz2 external_python_setuptools-144f72286d67f8e0368333bf1c3115ebce18c374.zip |
Some fixes
After testing VC Builds Tools 2015 with current = Amd64 and target = Amd64, x86, Arm
-rw-r--r-- | setuptools/msvc9_support.py | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/setuptools/msvc9_support.py b/setuptools/msvc9_support.py index 1737cc21..7cafd062 100644 --- a/setuptools/msvc9_support.py +++ b/setuptools/msvc9_support.py @@ -324,11 +324,11 @@ class PlatformInfo: "\current" if target architecture is current architecture, "\current_target" if not. """ - path = self.target_dir(True) - if self.target_cpu != self.current_cpu: - current = 'x86' if forcex86 else self.current_cpu - path = path.replace('\\', '\\%s_' % current) - return path + current = 'x86' if forcex86 else self.current_cpu + if self.target_cpu != current: + return self.target_dir().replace('\\', '\\%s_' % current) + else: + return '' class RegistryInfo: @@ -818,24 +818,27 @@ class EnvironmentInfo: """ if self.vcver < 14.0: return [] - return os.path.join(self.si.VCInstallDir, r'Lib\store\references') + return [os.path.join(self.si.VCInstallDir, r'Lib\store\references')] @property def VCTools(self): """ Microsoft Visual C++ Tools """ + si = self.si + tools = [os.path.join(si.VCInstallDir, 'VCPackages')] + forcex86 = True if self.vcver <= 10.0 else False arch_subdir = self.pi.cross_dir(forcex86) - tools = [os.path.join(self.si.VCInstallDir, 'VCPackages'), - os.path.join(self.si.VCInstallDir, 'Bin%s' % arch_subdir)] + if arch_subdir: + tools += [os.path.join(si.VCInstallDir, 'Bin%s' % arch_subdir)] - if self.pi.cross_dir() and self.vcver >= 14.0: + if self.vcver >= 14.0: path = 'Bin%s' % self.pi.current_dir(hidex86=True) - tools += [os.path.join(self.si.VCInstallDir, path)] + tools += [os.path.join(si.VCInstallDir, path)] else: - tools += [os.path.join(self.si.VCInstallDir, 'Bin')] + tools += [os.path.join(si.VCInstallDir, 'Bin')] return tools @@ -999,9 +1002,8 @@ class EnvironmentInfo: return [] arch_subdir = self.pi.current_dir(hidex86=True) - path = r'\MSBuild\%0.1f\bin%s' % (self.vcver, arch_subdir) - return [os.path.join(self.si.ProgramFilesx86, path), - os.path.join(self.si.ProgramFiles, path)] + path = r'MSBuild\%0.1f\bin%s' % (self.vcver, arch_subdir) + return [os.path.join(self.si.ProgramFilesx86, path)] @property def HTMLHelpWorkshop(self): @@ -1011,8 +1013,7 @@ class EnvironmentInfo: if self.vcver < 11.0: return [] - return [os.path.join(self.si.ProgramFilesx86, 'HTML Help Workshop'), - os.path.join(self.si.ProgramFiles, 'HTML Help Workshop')] + return [os.path.join(self.si.ProgramFilesx86, 'HTML Help Workshop')] @property def UCRTLibraries(self): |