Browse Source

Merge pull request #445 from commodo/python-update-2

Python update 2
lilik-openwrt-22.03
sbyx 10 years ago
parent
commit
eb3ccec265
2 changed files with 13 additions and 8 deletions
  1. +6
    -6
      lang/python/Makefile
  2. +7
    -2
      lang/python/files/python-package.mk

+ 6
- 6
lang/python/Makefile View File

@ -126,13 +126,13 @@ endef
define Package/python-readline
$(call Package/python/Default)
TITLE:=Python support for readline
DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libreadline +libncurses @BROKEN
DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libreadline +libncursesw @BROKEN
endef
define Package/python-ncurses
$(call Package/python/Default)
TITLE:=Python support for readline
DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libncurses
DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libncursesw
endef
MAKE_FLAGS:=\
@ -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 \
@ -384,12 +384,12 @@ define PyPackage/python/filespec
+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_heapq.so
+|/usr/lib/python$(PYTHON_VERSION)/bisect.py
+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_bisect.so
+|/usr/include/python$(PYTHON_VERSION)/pyconfig.h
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


+ 7
- 2
lang/python/files/python-package.mk View File

@ -72,9 +72,14 @@ endef
define Build/Compile/PyMod
$(call HostPython, \
cd $(PKG_BUILD_DIR)/$(strip $(1)); \
CC="$(TARGET_CC)" \
CCSHARED="$(TARGET_CC) $(FPIC)" \
LD="$(TARGET_CC)" \
LDSHARED="$(TARGET_CC) -shared" \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="$(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON_INC_DIR)" \
LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)" \
_PYTHON_HOST_PLATFORM="linux-$(ARCH)" \
$(3) \
, \
./setup.py $(2) \


Loading…
Cancel
Save