Fix pyconfig.h oi_151a
authorJon Tibble <meths@btinternet.com>
Sat, 16 Nov 2013 18:51:53 +0000
branchoi_151a
changeset 354 0b9db78d3d26
parent 353 b803ae0c274c
child 355 5accb388ed3d
Fix pyconfig.h
components/python/python26/Makefile
components/python/python26/files/pyconfig.h
components/python/python26/python-26.p5m
--- a/components/python/python26/Makefile	Sat Nov 16 18:43:16 2013 +0000
+++ b/components/python/python26/Makefile	Sat Nov 16 18:51:53 2013 +0000
@@ -35,6 +35,11 @@
 include $(WS_TOP)/make-rules/configure.mk
 include $(WS_TOP)/make-rules/ips.mk
 
+# Need to preserve timestamp for Grammar files.  If the pickle files are older, 
+# Python will try to rebuild them.  
+PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.txt
+PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.pickle
+
 # We patch auto* files, so regenerate headers and configure
 COMPONENT_PREP_ACTION = \
 	(cd $(@D) ; autoheader ; autoconf)
@@ -82,6 +87,16 @@
 # 64 bit shared objects need to go in a 64-bit directory
 COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.6/lib-dynload
 
+# Setup pyconfig.h file to support 32 & 64 bit.
+# If the /usr/lib/python2.6/lib2to3/*.pickle files are older than the related
+# *.txt files in the same directory, it will rebuild them anytime you try to
+# build a Python module.  So here we also touch the pickle files to avoid this.
+#
+COMPONENT_POST_INSTALL_ACTION= \
+	(cd $(PROTOUSRDIR) ; \
+	$(MV) include/python2.6/pyconfig.h include/python2.6/pyconfig-$(BITS).h ; \
+	$(TOUCH) lib/python2.6/lib2to3/*.pickle)
+
 # common targets
 build:		$(BUILD_32_and_64)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/python26/files/pyconfig.h	Sat Nov 16 18:51:53 2013 +0000
@@ -0,0 +1,5 @@
+#ifdef _LP64
+#include <python2.6/pyconfig-64.h>
+#else
+#include <python2.6/pyconfig-32.h>
+#endif
--- a/components/python/python26/python-26.p5m	Sat Nov 16 18:43:16 2013 +0000
+++ b/components/python/python26/python-26.p5m	Sat Nov 16 18:51:53 2013 +0000
@@ -148,7 +148,9 @@
 file path=usr/include/python2.6/pgenheaders.h
 file path=usr/include/python2.6/py_curses.h
 file path=usr/include/python2.6/pyarena.h
-file path=usr/include/python2.6/pyconfig.h
+file files/pyconfig.h path=usr/include/python2.6/pyconfig.h
+file path=usr/include/python2.6/pyconfig-32.h
+file path=usr/include/python2.6/pyconfig-64.h
 file path=usr/include/python2.6/pydebug.h
 file path=usr/include/python2.6/pyerrors.h
 file path=usr/include/python2.6/pyexpat.h