Ignore:
Timestamp:
Aug 2, 2017 9:45:09 AM (7 years ago)
Author:
riza
Message:

Close #2034: Add support to Python3 using PJSUA2 API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/swig/python/Makefile

    r4798 r5638  
    11PYTHON_SO=_pjsua2.so 
     2 
     3USE_PYTHON3=1 
     4 
     5ifeq ($(USE_PYTHON3),1) 
     6  PYTHON_EXE=python3 
     7  PYTHON_PKG_DIR=$(HOME)/.local/lib/python3.6/site-packages 
     8else 
     9  PYTHON_EXE=python 
     10  PYTHON_PKG_DIR=$(HOME)/.local/lib/python2.7/site-packages 
     11endif 
    212 
    313#PYTHON_SETUP_FLAGS = --inplace  
     
    1727 
    1828$(PYTHON_SO): pjsua2_wrap.cpp setup.py $(GCC_EXE) 
    19         python setup.py build $(PYTHON_SETUP_FLAGS) 
     29        $(PYTHON_EXE) setup.py build $(PYTHON_SETUP_FLAGS) 
    2030 
    2131gcc.exe: cc_mingw.c 
     
    3141 
    3242install: 
    33         python setup.py install --user 
     43        $(PYTHON_EXE) setup.py install --user 
    3444 
    3545uninstall: 
    36         rm -f $(HOME)/.local/lib/python2.7/site-packages/pjsua2* 
    37         rm -f $(HOME)/.local/lib/python2.7/site-packages/_pjsua2* 
     46        rm -f $(PYTHON_PKG_DIR)/pjsua2* 
     47        rm -f $(PYTHON_PKG_DIR)/_pjsua2* 
    3848 
Note: See TracChangeset for help on using the changeset viewer.