summaryrefslogtreecommitdiffstats
path: root/package/python/python.mk
diff options
context:
space:
mode:
authorHamish Moffatt <hamish@cloud.net.au>2008-02-06 00:55:05 +0000
committerHamish Moffatt <hamish@cloud.net.au>2008-02-06 00:55:05 +0000
commit05ecb806ff958dcf2a2ac2683d765bfa272f7677 (patch)
tree26141bc9a6288f018103f3c8fe150686f4dfe53a /package/python/python.mk
parenta5c831661e9e3c01676b860d407aabb98e3098cb (diff)
downloadbuildroot-novena-05ecb806ff958dcf2a2ac2683d765bfa272f7677.tar.gz
buildroot-novena-05ecb806ff958dcf2a2ac2683d765bfa272f7677.zip
Added configuration item to control whether development headers and libraries are installed on the target
Removed some additional files if optional modules are disabled
Diffstat (limited to 'package/python/python.mk')
-rw-r--r--package/python/python.mk21
1 files changed, 20 insertions, 1 deletions
diff --git a/package/python/python.mk b/package/python/python.mk
index 9f7e1b885..050db443f 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -4,6 +4,7 @@
#
#############################################################
PYTHON_VERSION=2.4.2
+PYTHON_VERSION_SHORT=2.4
PYTHON_SOURCE:=Python-$(PYTHON_VERSION).tar.bz2
PYTHON_SITE:=http://python.org/ftp/python/$(PYTHON_VERSION)
PYTHON_DIR:=$(BUILD_DIR)/Python-$(PYTHON_VERSION)
@@ -136,13 +137,31 @@ endif
find $(TARGET_DIR)/usr/lib/ -name '*.pyo' -exec rm {} \; && \
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc \
- $(TARGET_DIR)/usr/lib/python*/test
+ $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_SHORT)/test
+ cp -dpr $(TARGET_DIR)/usr/include/python$(PYTHON_VERSION_SHORT) $(STAGING_DIR)/usr/include/
+ mkdir -p $(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_SHORT)
+ cp -dpr $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_SHORT)/config $(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_SHORT)/
+
ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY),y)
find $(TARGET_DIR)/usr/lib/ -name '*.pyc' -exec rm {} \;
endif
ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
find $(TARGET_DIR)/usr/lib/ -name '*.py' -exec rm {} \;
endif
+ifneq ($(BR2_PACKAGE_PYTHON_DEV),y)
+ rm -rf $(TARGET_DIR)/usr/include/python$(PYTHON_VERSION_SHORT)
+ rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_SHORT)/config
+ find $(TARGET_DIR)/usr/lib/ -name '*.py' -exec rm {} \;
+endif
+ifneq ($(BR2_PACKAGE_PYTHON_BSDDB),y)
+ rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_SHORT)/bsddb
+endif
+ifneq ($(BR2_PACKAGE_PYTHON_CURSES),y)
+ rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_SHORT)/curses
+endif
+ifneq ($(BR2_PACKAGE_PYTHON_TKINTER),y)
+ rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_SHORT)/lib-tk
+endif
python: uclibc $(PYTHON_DEPS) $(TARGET_DIR)/$(PYTHON_TARGET_BINARY)