[uClibc] update python files

Mike Frysinger vapier at gentoo.org
Sat Aug 28 07:19:28 UTC 2004


this should resolve the python issues people mentioned earlier ... please test 
and get back to me :)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python-cross-compile.patch
Type: text/x-diff
Size: 5213 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20040828/5f775128/attachment.bin 
-------------- next part --------------
#############################################################
#
# python
#
#############################################################
PYTHON_VERSION=2.3.4
PYTHON_SOURCE:=Python-$(PYTHON_VERSION).tgz
PYTHON_SITE:=http://python.org/ftp/python/$(PYTHON_VERSION)
PYTHON_DIR:=$(BUILD_DIR)/Python-$(PYTHON_VERSION)
PYTHON_CAT:=zcat
PYTHON_BINARY:=python
PYTHON_TARGET_BINARY:=usr/bin/python

$(DL_DIR)/$(PYTHON_SOURCE):
	 $(WGET) -P $(DL_DIR) $(PYTHON_SITE)/$(PYTHON_SOURCE)

python-source: $(DL_DIR)/$(PYTHON_SOURCE)

$(PYTHON_DIR)/.unpacked: $(DL_DIR)/$(PYTHON_SOURCE)
	$(PYTHON_CAT) $(DL_DIR)/$(PYTHON_SOURCE) | tar -C $(BUILD_DIR) -xf -
	touch $(PYTHON_DIR)/.unpacked

$(PYTHON_DIR)/.patched: $(PYTHON_DIR)/.unpacked
	$(SOURCE_DIR)/patch-kernel.sh $(PYTHON_DIR) $(SOURCE_DIR) python*.patch
	touch $(PYTHON_DIR)/.patched

$(PYTHON_DIR)/.hostpython: $(PYTHON_DIR)/.patched
	(cd $(PYTHON_DIR); rm -rf config.cache; \
		OPT="-O1" \
		./configure \
		--with-cxx=no \
		$(DISABLE_NLS); \
		make python Parser/pygen; \
		mv python hostpython; \
		mv Parser/pgen Parser/hostpgen; \
		make distclean \
	);
	touch $(PYTHON_DIR)/.hostpython

$(PYTHON_DIR)/.configured: $(PYTHON_DIR)/.hostpython
	(cd $(PYTHON_DIR); rm -rf config.cache; \
		$(TARGET_CONFIGURE_OPTS) \
		OPT=$(TARGET_OPTIMIZATION) \
		./configure \
		--target=$(GNU_TARGET_NAME) \
		--host=$(GNU_TARGET_NAME) \
		--build=$(GNU_HOST_NAME) \
		--prefix=/usr \
		--sysconfdir=/etc \
		--with-cxx=no \
		$(DISABLE_NLS) \
	);
	touch $(PYTHON_DIR)/.configured

$(PYTHON_DIR)/$(PYTHON_BINARY): $(PYTHON_DIR)/.configured
	$(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR) \
		HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen

$(TARGET_DIR)/$(PYTHON_TARGET_BINARY): $(PYTHON_DIR)/$(PYTHON_BINARY)
	LD_LIBRARY_PATH=$(STAGING_DIR)/lib
	$(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR) install \
		DESTDIR=$(TARGET_DIR) CROSS_COMPILE=yes \
		HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen
	rm $(TARGET_DIR)/usr/bin/idle
	rm $(TARGET_DIR)/usr/bin/pydoc
	find $(TARGET_DIR)/usr/lib/ -name '*.pyc' -o -name '*.pyo' | xargs rm
	rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
		$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc

python: uclibc $(TARGET_DIR)/$(PYTHON_TARGET_BINARY)

python-clean:
	-$(MAKE) -C $(PYTHON_DIR) distclean
	rm $(PYTHON_DIR)/.configured

python-dirclean:
	rm -rf $(PYTHON_DIR)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 838 bytes
Desc: signature
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20040828/5f775128/attachment-0002.pgp 


More information about the uClibc mailing list