swig/Examples/python/import_packages/relativeimport2/Makefile
Olly Betts c7af8eabb3 Default to running tests with Python 3
Specify PY2=1 to use Python 2.

See #1779
Closes #2235
2022-03-17 18:55:10 +13:00

22 lines
477 B
Makefile

TOP = ../../..
LIBS =
ifneq (,$(PY2))
PKG1DIR = "py2"
else
PKG1DIR = "py3"
endif
check: build
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
cd $(PKG1DIR) && $(MAKE) SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' build
static:
cd $(PKG1DIR) && $(MAKE) SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' static
clean:
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd py2 && $(MAKE) clean
cd py3 && $(MAKE) clean