How to build extensions on Windows?

John Machin sjmachin at lexicon.net
Wed Sep 13 20:28:40 EDT 2006


Martin v. Löwis wrote:
> John Machin schrieb:
> > Any support for the radical notion of the error message giving the full
> > path of the file that it's complaining about? If so, I'll lob in an
> > enhancement request in the morning ...
>
> A patch would be appreciated much more so.
>

Hi Martin, I do hope you don't regret opening Pandora's box :-)

Does the following look about right?
I was somewhat bemused by the limit of 200 bytes on the module name in
the error message-- I woild have thought about 20 was more appropriate.
Sorry but I can't test this (Windows box, don't have whatever version
of C compiler is necessary to compile Python).

Cheers,
John
8<---
--- Python/importdl.c.orig      2006-09-14 09:53:59.984375000 +1000
+++ Python/importdl.c   2006-09-14 09:55:53.625000000 +1000
@@ -44,8 +44,8 @@
                return NULL;
        if (p == NULL) {
                PyErr_Format(PyExc_ImportError,
-                  "dynamic module does not define init function
(init%.200s)",
-                            shortname);
+                  "dynamic module (%s) does not define init function
(init%.200s)",
+                            pathname, shortname);
                return NULL;
        }
         oldcontext = _Py_PackageContext;
8<---




More information about the Python-list mailing list