diff options
author | Alexandru Ardelean <ardeleanalex@gmail.com> | 2014-10-19 10:45:17 +0300 |
---|---|---|
committer | Alexandru Ardelean <ardeleanalex@gmail.com> | 2014-10-19 22:33:08 +0300 |
commit | a1f86a6870875fca8f288df01ed283927c544a69 (patch) | |
tree | 7b0098bc58d27e5dfe3db7d95b9e3d2febbfb452 /lang/python | |
parent | 855ef2a53085f79a0603de7cd08a7ea8923e62c2 (diff) |
python: enable shared python lib; make this the norm
This will reduce the bloat when users will want to compile in their
Python C extensions.
There will be a initial bloat (several kb) if just Python
is installed, but that will be compensated when users will add more
C extensions.
During the build we also have to add Python's PKG_BUILD_DIR
so that the shared lib is found when compiling Python's
built-in C extensions.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'lang/python')
-rw-r--r-- | lang/python/Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lang/python/Makefile b/lang/python/Makefile index a2b2699e6..02f5a3b05 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -140,7 +140,7 @@ MAKE_FLAGS:=\ DESTDIR="$(PKG_INSTALL_DIR)" \ CROSS_COMPILE=yes \ CFLAGS="$(TARGET_CFLAGS) -DNDEBUG -fno-inline" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) -L$(PKG_BUILD_DIR)" \ LD="$(TARGET_CC)" \ PGEN=pgen2 @@ -155,7 +155,7 @@ define Build/Configure $(CP) ./files/config.site $(PKG_BUILD_DIR) $(call Build/Configure/Default, \ --sysconfdir=/etc \ - --disable-shared \ + --enable-shared \ --without-cxx-main \ --with-threads \ --with-system-ffi="$(STAGING_DIR)/usr" \ @@ -176,7 +176,7 @@ define Build/InstallDev $(1)/usr/include/ $(CP) \ $(STAGING_DIR_HOST)/lib/python$(PYTHON_VERSION) \ - $(PKG_BUILD_DIR)/libpython$(PYTHON_VERSION).a \ + $(PKG_BUILD_DIR)/libpython$(PYTHON_VERSION).so* \ $(1)/usr/lib/ $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \ @@ -389,6 +389,7 @@ endef define PyPackage/python/install $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python2 + $(CP) $(PKG_BUILD_DIR)/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/ endef define PyPackage/python-doc/filespec |