Dear Mark,

Thanks for the response.

Is this is a bug, or is this a known "feature" that I should solve in
another manner. If this is a bug, can someone help me fix it?

It probably can be considered a bug - the Python issue tracker is the place where it should be reported (but be sure to check it hasn't already been reported).  From your earlier message, it sounds like you already have a handle on how to fix it (although I suspect it might be better for the caller of library_dir_option to add the quotes).

Ok, I will report the bug there. I wasn't sure whether distutils had its own issue tracker (I couldn't find it anyway).

Further, I'm a bit surprised to find this bug. I can't be the only one
who wants to compile stuff with the MS compiler and who has Python
installed in his "program files".

You may well be.  "program files" isn't the default location and even if it was, I suspect most developers would override it.  So I suspect that most people either (a) use the default location or (b) override it to something without spaces in the path.

Well I didn't :)  And I can hardly be the only one. I can't imagine I'm the first to run into this bug. Maybe because the produced link error is not helpful at all, people did not know what to do with it?