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
f357a32f
Commit
f357a32f
authored
Apr 07, 2017
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify _get_content_dirname by simply removing the trailing backslash. Ref #995.
parent
3fa9efcb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
setuptools/msvc.py
setuptools/msvc.py
+3
-8
No files found.
setuptools/msvc.py
View file @
f357a32f
...
...
@@ -1010,7 +1010,7 @@ class EnvironmentInfo:
elif self.vc_ver >= 15.0:
path = os.path.join(self.si.WindowsSdkDir, '
Bin
')
arch_subdir = self.pi.current_dir(x64=True)
sdkver = self._get_content_dirname(path
, slash=False
)
sdkver = self._get_content_dirname(path
).rstrip('
\\
'
)
yield os.path.join(path, r'
%
s
%
s
' % (sdkver, arch_subdir))
if self.si.WindowsSDKExecutablePath:
...
...
@@ -1243,7 +1243,7 @@ class EnvironmentInfo:
seen_add(k)
yield element
def _get_content_dirname(self, path
, slash=True
):
def _get_content_dirname(self, path):
"""
Return name of the first dir in path or '' if no dir found.
...
...
@@ -1251,8 +1251,6 @@ class EnvironmentInfo:
----------
path: str
Path where search dir.
slash: bool
If not True, only return "name" not "name
\
"
Return
------
...
...
@@ -1262,10 +1260,7 @@ class EnvironmentInfo:
try:
name = os.listdir(path)
if name:
name = name[0]
if slash:
return '
%
s
\\
' % name
return name
return '
%
s
\\
' % name[0]
return ''
except (OSError, IOError):
return ''
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