From e3805614a5ed770d3ba86acd339a24947c19a65b Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 5 Aug 2016 12:58:47 +0200 Subject: [PATCH] quote library_dir_option after calling unpatched version avoids double-quotes if the calling function does the quoting correctly. --- setuptools/msvc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 2700a2b066..97dd441c5c 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -233,10 +233,11 @@ def msvc14_library_dir_option(self, dir): ------ "\LIBPATH" argument: str """ - if ' ' in dir and '"' not in dir: + opt = unpatched['msvc14_library_dir_option'](self, dir) + if ' ' in opt and '"' not in opt: # Quote if space and not already quoted - dir = '"%s"' % dir - return unpatched['msvc14_library_dir_option'](self, dir) + opt = '"%s"' % opt + return opt def _augment_exception(exc, version, arch=''):