This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author klo.uo
Recipients eric.araujo, klo.uo, tarek
Date 2013-01-09.12:22:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357734162.78.0.136546351961.issue16907@psf.upfronthosting.co.za>
In-reply-to
Content
I noticed this issue, while trying to compile Cython extension, when source file is in path with spaces. Extension wouldn't compile because LIBDIR is passed to MinGW g++ (though not to gcc) or MSVC compilers unquoted. I tracked the problem to "distutils/build_ext.py" in get_ext_fullpath() function.

I patched it, this way:

========================================
--- build_ext.bak
+++ build_ext.py
@@ -647,6 +647,11 @@
         package = '.'.join(modpath[0:-1])
         build_py = self.get_finalized_command('build_py')
         package_dir = os.path.abspath(build_py.get_package_dir(package))
+        try:
+            from win32api import GetShortPathName
+            package_dir = GetShortPathName(package_dir)
+        except:
+            pass
         # returning
         #   package_dir/filename
         return os.path.join(package_dir, filename)
========================================

which is just one way to do it.
History
Date User Action Args
2013-01-09 12:22:42klo.uosetrecipients: + klo.uo, tarek, eric.araujo
2013-01-09 12:22:42klo.uosetmessageid: <1357734162.78.0.136546351961.issue16907@psf.upfronthosting.co.za>
2013-01-09 12:22:42klo.uolinkissue16907 messages
2013-01-09 12:22:42klo.uocreate