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
9919fdfa
Commit
9919fdfa
authored
Feb 23, 2016
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pull program files and win dir resolution into PlatformInfo
parent
3a122756
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
setuptools/msvc9_support.py
setuptools/msvc9_support.py
+8
-10
No files found.
setuptools/msvc9_support.py
View file @
9919fdfa
...
...
@@ -89,6 +89,9 @@ def query_vcvarsall(version, arch='x86', *args, **kwargs):
class
PlatformInfo
:
current_cpu
=
os
.
environ
[
'processor_architecture'
].
lower
()
win_dir
=
os
.
environ
[
'WinDir'
]
program_files
=
os
.
environ
[
'ProgramFiles'
]
program_files_x86
=
os
.
environ
.
get
(
'ProgramFiles(x86)'
,
program_files
)
def
__init__
(
self
,
arch
):
self
.
arch
=
arch
...
...
@@ -134,11 +137,6 @@ def _query_vcvarsall(version, arch):
"""
pi
=
PlatformInfo
(
arch
)
# Find "Windows" and "Program Files" system directories
WinDir
=
os
.
environ
[
'WinDir'
]
ProgramFiles
=
os
.
environ
[
'ProgramFiles'
]
ProgramFilesX86
=
os
.
environ
.
get
(
'ProgramFiles(x86)'
,
ProgramFiles
)
# Set registry base paths
reg_value
=
distutils
.
msvc9compiler
.
Reg
.
get_value
node
=
r'\
Wow
6432Node'
if
not
pi
.
current_is_x86
()
else
''
...
...
@@ -155,7 +153,7 @@ def _query_vcvarsall(version, arch):
except
KeyError
:
# If fail, use default path
name
=
'Microsoft Visual Studio %0.1f'
%
version
VsInstallDir
=
os
.
path
.
join
(
ProgramFilesX
86
,
name
)
VsInstallDir
=
os
.
path
.
join
(
pi
.
program_files_x
86
,
name
)
# Find Microsoft Visual C++ directory
try
:
...
...
@@ -169,7 +167,7 @@ def _query_vcvarsall(version, arch):
except
KeyError
:
# If fail, use default path
default
=
r'Microsoft Visual Studio %0.1f\
VC
' % version
VcInstallDir = os.path.join(
ProgramFilesX
86, default)
VcInstallDir = os.path.join(
pi.program_files_x
86, default)
if not os.path.isdir(VcInstallDir):
msg = '
vcvarsall
.
bat
and
Visual
C
++
directory
not
found
'
raise distutils.errors.DistutilsPlatformError(msg)
...
...
@@ -201,7 +199,7 @@ def _query_vcvarsall(version, arch):
# If fail, use default path
for ver in WindowsSdkVer:
path = r'
Microsoft
SDKs
\
Windows
\
v
%
s
' % ver
d = os.path.join(
ProgramF
iles, path)
d = os.path.join(
pi.program_f
iles, path)
if os.path.isdir(d):
WindowsSdkDir = d
if not WindowsSdkDir:
...
...
@@ -214,7 +212,7 @@ def _query_vcvarsall(version, arch):
FrameworkDir32 = reg_value(VcReg, '
frameworkdir32
')
except KeyError:
# If fail, use default path
FrameworkDir32 = os.path.join(
WinD
ir, r'
Microsoft
.
NET
\
Framework
')
FrameworkDir32 = os.path.join(
pi.win_d
ir, r'
Microsoft
.
NET
\
Framework
')
# Find Microsoft .NET Framework 64bit directory
try:
...
...
@@ -222,7 +220,7 @@ def _query_vcvarsall(version, arch):
FrameworkDir64 = reg_value(VcReg, '
frameworkdir64
')
except KeyError:
# If fail, use default path
FrameworkDir64 = os.path.join(
WinD
ir, r'
Microsoft
.
NET
\
Framework64
')
FrameworkDir64 = os.path.join(
pi.win_d
ir, r'
Microsoft
.
NET
\
Framework64
')
# Find Microsoft .NET Framework Versions
if version == 10.0:
...
...
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