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
e24dda7a
Commit
e24dda7a
authored
Jun 24, 2016
by
Jason R. Coombs
Committed by
GitHub
Jun 24, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #614 from JGoutin/patch-1
Issue #593 and other fixes
parents
f9b1e673
9abc044e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
setuptools/msvc9_support.py
setuptools/msvc9_support.py
+19
-15
No files found.
setuptools/msvc9_support.py
View file @
e24dda7a
...
...
@@ -202,7 +202,7 @@ def msvc14_get_vc_env(plat_spec):
# If error, try to set environment directly
try
:
return
EnvironmentInfo
(
plat_spec
,
vc
ver
min
=
14.0
).
return_env
()
return
EnvironmentInfo
(
plat_spec
,
vc
_ver_
min
=
14.0
).
return_env
()
except
distutils
.
errors
.
DistutilsPlatformError
as
exc
:
_augment_exception
(
exc
,
14.0
)
raise
...
...
@@ -237,7 +237,7 @@ def _augment_exception(exc, version, arch=''):
message
+=
' Get it with "Microsoft Windows SDK 7.1": '
message
+=
msdownload
%
8279
exc
.
args
[
0
]
=
message
exc
.
args
=
(
message
,
)
class
PlatformInfo
:
...
...
@@ -460,6 +460,8 @@ class SystemInfo:
vc_ver: float
Required Microsoft Visual C++ version.
"""
# Variables and properties in this class use originals CamelCase variables
# names from Microsoft source files for more easy comparaison.
WinDir = safe_env['
WinDir
']
ProgramFiles = safe_env['
ProgramFiles
']
ProgramFilesx86 = os.environ.get('
ProgramFiles
(
x86
)
', ProgramFiles)
...
...
@@ -481,7 +483,7 @@ class SystemInfo:
Find all available Microsoft Visual C++ versions.
"""
vckeys = (self.ri.vc, self.ri.vc_for_python)
v
s
vers = []
v
c_
vers = []
for hkey in self.ri.HKEYS:
for key in vckeys:
try:
...
...
@@ -492,18 +494,18 @@ class SystemInfo:
for i in range(values):
try:
ver = float(winreg.EnumValue(bkey, i)[0])
if ver not in v
s
vers:
v
s
vers.append(ver)
if ver not in v
c_
vers:
v
c_
vers.append(ver)
except ValueError:
pass
for i in range(subkeys):
try:
ver = float(winreg.EnumKey(bkey, i))
if ver not in v
s
vers:
v
s
vers.append(ver)
if ver not in v
c_
vers:
v
c_
vers.append(ver)
except ValueError:
pass
return sorted(v
s
vers)
return sorted(v
c_
vers)
@property
def VSInstallDir(self):
...
...
@@ -527,18 +529,18 @@ class SystemInfo:
guess_vc = os.path.join(self.ProgramFilesx86, default)
# Try to get "VC++ for Python" path from registry as default path
path = os.path.join(self.ri.vc_for_python, '
%
0.1
f' % self.vc_ver)
python_vc = self.ri.lookup(path, '
installdir
')
reg_
path = os.path.join(self.ri.vc_for_python, '
%
0.1
f' % self.vc_ver)
python_vc = self.ri.lookup(
reg_
path, '
installdir
')
default_vc = os.path.join(python_vc, '
VC
') if python_vc else guess_vc
# Try to get path from registry, if fail use default path
result
= self.ri.lookup(self.ri.vc, '
%
0.1
f' % self.vc_ver) or default_vc
path
= self.ri.lookup(self.ri.vc, '
%
0.1
f' % self.vc_ver) or default_vc
if not os.path.isdir(
result
):
if not os.path.isdir(
path
):
msg = '
Microsoft
Visual
C
++
directory
not
found
'
raise distutils.errors.DistutilsPlatformError(msg)
return
result
return
path
@property
def WindowsSdkVersion(self):
...
...
@@ -758,6 +760,8 @@ class EnvironmentInfo:
vc_min_ver: float
Minimum Microsoft Visual C++ version.
"""
# Variables and properties in this class use originals CamelCase variables
# names from Microsoft source files for more easy comparaison.
def
__init__
(
self
,
arch
,
vc_ver
=
None
,
vc_min_ver
=
None
):
self
.
pi
=
PlatformInfo
(
arch
)
self
.
ri
=
RegistryInfo
(
self
.
pi
)
...
...
@@ -773,7 +777,7 @@ class EnvironmentInfo:
"""
Microsoft Visual C++ version.
"""
return
self
.
si
.
vcver
return
self
.
si
.
vc
_
ver
@
property
def
VSTools
(
self
):
...
...
@@ -1101,7 +1105,7 @@ class EnvironmentInfo:
self.FSharp],
exists),
)
if self.vcver >= 14 and os.path.isfile(self.VCRuntimeRedist):
if self.vc
_
ver >= 14 and os.path.isfile(self.VCRuntimeRedist):
env['
py_vcruntime_redist
'] = self.VCRuntimeRedist
return 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