Fix issue with relative import when using single header file import.

-- The commit propagates the package option to the newly create
     module node so it is recognized by SWIG
  -- Added a relativeimport test for this combination
     (in lack of py3 I was not able to test it with py3 but it
      "should just work")
This commit is contained in:
Johan Hake 2014-08-12 21:48:26 +02:00
commit 1dd297ad9d
23 changed files with 190 additions and 0 deletions

View file

@ -0,0 +1,9 @@
# Test import of modules content from within __init__.py
print "Testing %module(package=...) with -relativeimport"
import sys
if sys.version_info < (3,0):
import py2.pkg2.bar
print " Finished importing py2.pkg2.bar"
else:
import py3.pkg2.bar
print " Finished importing py3.pkg2.bar"