Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
6d11de6d
Commit
6d11de6d
authored
Feb 23, 2016
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move finding of visual studio into RegistryInfo
parent
758b4249
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
setuptools/msvc9_support.py
setuptools/msvc9_support.py
+11
-8
No files found.
setuptools/msvc9_support.py
View file @
6d11de6d
...
...
@@ -164,6 +164,14 @@ class RegistryInfo:
def windows_sdk(self):
return os.path.join(self.microsoft, r'
Microsoft
SDKs
\
Windows
')
def find_visual_studio(self):
"""
Find Microsoft Visual Studio directory
"""
name = '
Microsoft
Visual
Studio
%
0.1
f' % self.version
default = os.path.join(self.platform_info.program_files_x86, name)
return self.lookup(self.vs, '
%
0.1
f' % self.version) or default
def lookup(self, base, key):
try:
return distutils.msvc9compiler.Reg.get_value(base, key)
...
...
@@ -180,11 +188,6 @@ def _query_vcvarsall(version, arch):
reg = RegistryInfo(pi, version)
reg_value = reg.lookup
# Find Microsoft Visual Studio directory
name = '
Microsoft
Visual
Studio
%
0.1
f' % version
default_vs = os.path.join(pi.program_files_x86, name)
VsInstallDir = reg_value(reg.vs, '
%
0.1
f' % version) or default_vs
# Find Microsoft Visual C++ directory
# If fail, use default path
...
...
@@ -254,8 +257,8 @@ def _query_vcvarsall(version, arch):
# Set Microsoft Visual Studio Tools
VSTools = [
os.path.join(
VsInstallDir
, r'
Common7
\
IDE
'),
os.path.join(
VsInstallDir
, r'
Common7
\
Tools
'),
os.path.join(
reg.find_visual_studio()
, r'
Common7
\
IDE
'),
os.path.join(
reg.find_visual_studio()
, r'
Common7
\
Tools
'),
]
# Set Microsoft Visual C++ Includes
...
...
@@ -302,7 +305,7 @@ def _query_vcvarsall(version, arch):
FxTools.append(os.path.join(FrameworkDir64, ver))
# Set Microsoft Visual Studio Team System Database
VsTDb = [os.path.join(
VsInstallDir
, r'
VSTSDB
\
Deploy
')]
VsTDb = [os.path.join(
reg.find_visual_studio()
, r'
VSTSDB
\
Deploy
')]
# Return Environment Variables
env = {}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment