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
25
Examples/python/import_packages/relativeimport3/Makefile
Normal file
25
Examples/python/import_packages/relativeimport3/Makefile
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
TOP = ../../..
|
||||
SWIG = $(realpath $(TOP)/../preinst-swig)
|
||||
SWIGOPT =
|
||||
LIBS =
|
||||
PY3 =
|
||||
|
||||
ifeq (,$(PY3))
|
||||
PKG1DIR = "py2"
|
||||
else
|
||||
PKG1DIR = "py3"
|
||||
endif
|
||||
|
||||
check: build
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
|
||||
|
||||
build:
|
||||
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' build
|
||||
|
||||
static:
|
||||
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' static
|
||||
|
||||
clean:
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
|
||||
cd py2 && $(MAKE) clean
|
||||
cd py3 && $(MAKE) clean
|
||||
Loading…
Add table
Add a link
Reference in a new issue