components/python/python27/Makefile
branchs11-update
changeset 3367 ed5024e47b53
parent 2914 4f1967424876
child 3565 2d729d36ded7
--- a/components/python/python27/Makefile	Fri Oct 03 14:30:07 2014 -0700
+++ b/components/python/python27/Makefile	Sat Oct 04 14:50:43 2014 -0700
@@ -26,20 +26,27 @@
 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
 
 COMPONENT_NAME=		Python
-COMPONENT_VERSION=	2.7.3
+COMPONENT_VERSION=	2.7.8
 COMPONENT_PROJECT_URL=	http://python.org/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
-COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
+COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:726457e11cb153adc3f428aaf1901fc561a374c30e5e7da6742c0742a338663c
+    sha256:edde10a0cb7d14e2735e682882d5b287028d1485c456758154c19573db68075a
 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	utility/python
 
+TPNO=			18461
+
 include $(WS_TOP)/make-rules/prep.mk
 include $(WS_TOP)/make-rules/configure.mk
 include $(WS_TOP)/make-rules/ips.mk
 include $(WS_TOP)/make-rules/lint-libraries.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)
@@ -91,8 +98,6 @@
 CONFIGURE_OPTIONS  +=		--with-system-ffi
 CONFIGURE_OPTIONS  +=		--without-gcc
 CONFIGURE_OPTIONS  +=		--enable-ipv6
-CONFIGURE_OPTIONS  +=		ac_cv_opt_olimit_ok=no
-CONFIGURE_OPTIONS  +=		ac_cv_olimit_ok=no
 CONFIGURE_OPTIONS  +=		CPPFLAGS="$(CPPFLAGS)"
 CONFIGURE_OPTIONS  +=		LDFLAGS="$(LDFLAGS)"
 CONFIGURE_OPTIONS  +=		CFLAGS="$(CFLAGS)"
@@ -102,27 +107,41 @@
 COMPONENT_BUILD_ENV  +=		DFLAGS="-$(BITS)"
 COMPONENT_BUILD_ENV  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
 
-# patches/00-bits.patch removes some AC_CHECK_SIZEOF tests in order to
-# generate a pyconfig.h that is both 32 and 64 bit compatible.  We add this
-# back to the environment so that configure can still work.  configure.in and
-# pyconfig.h.in should probably be rewhacked to do this more cleanly in the
-# future.
-CONFIGURE_OPTIONS.32  +=	ac_cv_sizeof_long=4
-CONFIGURE_OPTIONS.64  +=	ac_cv_sizeof_long=8
-
 # 64 bit shared objects need to go in a 64-bit directory
 COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload
 
-# common targets
-build:		$(BUILD_32_and_64)
+# Setup pyconfig.h file to support 32 & 64 bit.
+# If the /usr/lib/python2.7/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.7/pyconfig.h include/python2.7/pyconfig-$(BITS).h ; \
+             $(TOUCH) lib/python2.7/lib2to3/*.pickle)
 
-$(INSTALL_32):	$(INSTALL_64)
+ASLR_MODE = $(ASLR_ENABLE)
 
+# common targets
+$(INSTALL_32):  $(INSTALL_64)
+build:		$(BUILD_32_and_64)
 install:	$(INSTALL_32_and_64)
 
+# Using "-uall,-network" ensures all tests are run except the network tests.
+# The network tests contain many expected failures when run behind a firewall.
+# The "-v" ensures verbose mode.  You can set TESTOPTS_PYTHON_TEST to a
+# particular test if you want to run just one test.  For example, run gmake with
+# "-k" so it continues and does both 32-bit and 64-bit tests, even if there is a
+# failure, like this:
+# $ TESTOPTS_PYTHON_TEST=test_sys gmake -k test
+# Note that when a test succeeds, the builds/*/.tested file gets created.  You
+# may need to remove these files, or run "gmake clobber" or "gmake clean"
+# between tests.
+#
+COMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)"
 COMPONENT_TEST_TARGETS = test
 
-test:	$(TEST_32_and_64)
+test:				$(TEST_32_and_64)
 
 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)