[mod_python3, ESL py3mod] Add Python3 support.

This commit is contained in:
Andrey Volk
2021-09-26 13:23:46 +03:00
parent 3a66eb415f
commit d7eaa2e88c
35 changed files with 20248 additions and 13 deletions
+28
View File
@@ -0,0 +1,28 @@
LOCAL_CFLAGS=`$(PYTHON3) ./python-config --includes`
LOCAL_LDFLAGS=`$(PYTHON3) ./python-config --ldflags`
SITE_DIR=$(DESTDIR)/`$(PYTHON3) -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))"`
all: _ESL.so
esl_wrap.cpp:
swig3.0 -module ESL -classic -python -c++ -DMULTIPLICITY -threads -I../src/include -o esl_wrap.cpp ../ESL.i
esl_wrap.o: esl_wrap.cpp
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) -c esl_wrap.cpp -o esl_wrap.o
_ESL.so: esl_wrap.o
$(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(LOCAL_LDFLAGS) -o _ESL.so -L. $(LIBS)
install: _ESL.so
mkdir -p $(SITE_DIR)
install -m 755 _ESL.so $(SITE_DIR)
install -m 755 ESL.py $(SITE_DIR)
clean:
rm -f *.o *.so *~
swigclean:
rm -f esl_wrap.* ESL.so
reswig: swigclean esl_wrap.cpp