Apply patch #2143727 for Python from Serge Monkewitz to fix importing base classes when the package option is specified in %module and that module is %import'ed
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10960 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
415186c1f4
commit
1c4ec59e45
8 changed files with 44 additions and 15 deletions
|
|
@ -925,7 +925,11 @@ public:
|
|||
if (!options || (!Getattr(options, "noshadow") && !Getattr(options, "noproxy"))) {
|
||||
Printf(import, "_%s\n", modname);
|
||||
if (!Strstr(f_shadow_imports, import)) {
|
||||
Printf(f_shadow, "import %s\n", modname);
|
||||
if (pkg && (!package || Strcmp(pkg, package) != 0)) {
|
||||
Printf(f_shadow, "import %s.%s\n", pkg, modname);
|
||||
} else {
|
||||
Printf(f_shadow, "import %s\n", modname);
|
||||
}
|
||||
Printv(f_shadow_imports, import, NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue