diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-01-14 15:01:55 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-01-14 15:01:55 +0100 |
commit | ef8dcd670c2c5450362b36e01bd7213497930067 (patch) | |
tree | b1825555b24208d97b4c24b70cea04444da69014 /bindings/python | |
parent | 7f346c9058f39a533a2eaadc9ebc4001397c6ff9 (diff) | |
download | external_parameter-framework-ef8dcd670c2c5450362b36e01bd7213497930067.zip external_parameter-framework-ef8dcd670c2c5450362b36e01bd7213497930067.tar.gz external_parameter-framework-ef8dcd670c2c5450362b36e01bd7213497930067.tar.bz2 |
change to system python and swigreplicant-6.0-alpha-0004replicant-6.0-alpha-0003replicant-6.0-alpha-0002replicant-6.0-alpha-0001
Change-Id: Iefb42d20372dc90f4673277905dc6be52e5c1db1
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'bindings/python')
-rw-r--r-- | bindings/python/Android.mk | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/bindings/python/Android.mk b/bindings/python/Android.mk index b4b6277..ec4f3e1 100644 --- a/bindings/python/Android.mk +++ b/bindings/python/Android.mk @@ -44,7 +44,7 @@ LOCAL_32_BIT_ONLY := true LOCAL_SHARED_LIBRARIES := libxmlserializer_host libparameter_host # python is only available in 32bits for now, thus arch is forced to 32bits -PYTHON_INSTALL_PATH := prebuilts/python/$(HOST_OS)-x86/2.7.5/ +PYTHON_INSTALL_PATH := /usr PYTHON_INCLUDES_PATH := $(PYTHON_INSTALL_PATH)/include/python2.7 PYTHON_BIN_PATH := $(PYTHON_INSTALL_PATH)/bin @@ -74,24 +74,16 @@ LOCAL_GENERATED_SOURCES := $(generated-sources-dir)/pfw_wrap.cxx $(generated-sou LOCAL_EXPORT_C_INCLUDE_DIRS := $(generated-sources-dir) # Get the interpreter ld options. -ifeq ($(HOST_OS), darwin) - # Contrary to linux, on darwin, a python 64 bit executable is installed - # in the x86 prebuild directory, - # As all host libraries are 32 bit in android. We can not link and host - # python module against the prebuild python library. - # - # As a *dirty* workaround, use the system's python configuration and hope - # it will be compatible with the prebuild python interpreter used at runtime. - # To summarize the prebuild python (64 bit?) interpreter will load a - # python native module (32bit) linked with the host (32 bit ?) python library. - LOCAL_LDLIBS += $(shell python-config --ldflags) -else - # Careful, we need to invoke the android python config not the host's one. - # Unfortunately, the internal install directory of python is hardcoded to a dummy value, - # As a workaround, we need to manually add the correct path to libs to the library list. - LOCAL_LDLIBS += $(shell $(PYTHON_BIN_PATH)/python $(PYTHON_BIN_PATH)/python-config --ldflags) \ - -L $(PYTHON_INSTALL_PATH)/lib/ -endif +# Contrary to linux, on darwin, a python 64 bit executable is installed +# in the x86 prebuild directory, +# As all host libraries are 32 bit in android. We can not link and host +# python module against the prebuild python library. +# +# As a *dirty* workaround, use the system's python configuration and hope +# it will be compatible with the prebuild python interpreter used at runtime. +# To summarize the prebuild python (64 bit?) interpreter will load a +# python native module (32bit) linked with the host (32 bit ?) python library. +LOCAL_LDLIBS += $(shell python-config --ldflags) $(generated-sources-dir)/pfw_wrap.h: $(generated-sources-dir)/pfw_wrap.cxx @@ -101,9 +93,7 @@ $(generated-sources-dir)/pfw_wrap.cxx: $(LOCAL_PATH)/pfw.i @echo "Generating Python binding files" mkdir -p $(dir $@) # surprisingly, path is not generated by build system mkdir -p $(HOST_LIBRARY_PATH) - prebuilts/misc/$(HOST_OS)-$(HOST_ARCH)/swig/swig \ - -Iprebuilts/misc/common/swig/include/2.0.11/python/ \ - -Iprebuilts/misc/common/swig/include/2.0.11/ \ + /usr/bin/swig \ -Wall -Werror -v -python -c++ -outdir $(HOST_LIBRARY_PATH)/ -o $@ $^ include $(BUILD_HOST_SHARED_LIBRARY) |