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:
parent
c43f84af02
commit
1dd297ad9d
23 changed files with 190 additions and 0 deletions
9
Examples/python/import_packages/relativeimport3/runme.py
Normal file
9
Examples/python/import_packages/relativeimport3/runme.py
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue