2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=Python-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://www.python.org/ftp/python/2.4.3/
17 PKG_MD5SUM:=141c683447d5e76be1d2bd4829574f02
20 PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
22 include $(INCLUDE_DIR)/package.mk
27 TITLE:=Python programming language
28 URL:=http://www.python.org
32 define Package/python/description
33 Python programming language
34 Python is a dynamic object-oriented programming language that
35 can be used for many kinds of software development. It offers
36 strong support for integration with other languages and tools,
37 comes with extensive standard libraries, and can be learned in a
38 few days. Many Python programmers report substantial productivity
39 gains and feel the language encourages the development of higher
40 quality, more maintainable code.
43 define Build/Configure
44 (cd $(PKG_BUILD_DIR); \
46 ./configure --with-threads=no; \
47 $(MAKE) python Parser/pgen; \
48 mv python hostpython; \
49 mv Parser/pgen Parser/hostpgen; \
51 echo "import sys" > $(PKG_BUILD_DIR)/setup.py.new; \
52 echo "sys.path.append('$(PKG_BUILD_DIR)/Lib')" >> $(PKG_BUILD_DIR)/setup.py.new; \
53 cat $(PKG_BUILD_DIR)/setup.py.new $(PKG_BUILD_DIR)/setup.py > $(PKG_BUILD_DIR)/setup.py.foo; \
54 mv $(PKG_BUILD_DIR)/setup.py.foo $(PKG_BUILD_DIR)/setup.py; \
55 rm $(PKG_BUILD_DIR)/setup.py.new; \
57 $(call Build/Configure/Default, \
61 HOSTPYTHON=./hostpython \
62 HOSTPGEN=./Parser/hostpgen \
67 $(TARGET_CONFIGURE_OPTS) \
68 CFLAGS="$(TARGET_CFLAGS)" \
69 LD_LIBRARY_PATH="$(STAGING_DIR)/lib:$(LD_LIBRARY_PATH)" \
71 HOSTPYTHON=./hostpython \
72 HOSTPGEN=./Parser/hostpgen
75 $(MAKE) -C $(PKG_BUILD_DIR) \
76 DESTDIR="$(PKG_INSTALL_DIR)" \
81 define Package/python/install
83 $(MAKE) -C $(PKG_BUILD_DIR) \
89 $(eval $(call BuildPackage,python))