--- a/components/python/cheetah/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/cheetah/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -41,16 +41,6 @@
include $(WS_TOP)/make-rules/setup.py.mk
include $(WS_TOP)/make-rules/ips.mk
-# Needed to get around a broken /usr/lib/python2.7/config/Makefile
-# See CR #16837431.
-LD=$(CC)
-LDSHARED=$(CC) -G
-PYTHON_ENV += CC="$(CC)"
-PYTHON_ENV += LDSHARED="$(LDSHARED)"
-PYTHON_ENV += LD="$(LD)"
-PYTHON_ENV += CFLAGS="$(CFLAGS)"
-COMPONENT_INSTALL_ENV += $(PYTHON_ENV)
-
COMPONENT_POST_INSTALL_ACTION = \
(cd $(PROTO_DIR)/usr/bin ; \
$(MV) -f cheetah cheetah-$(PYTHON_VERSION) ; \
--- a/components/python/greenlet/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/greenlet/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -50,15 +50,8 @@
COMPONENT_PRE_BUILD_ACTION = \
$(MKDIR) $(SOURCE_DIR)/64
-# Needed to get around a broken /usr/lib/python2.7/config/Makefile
-# See CR #16837431.
-LD=$(CC)
-LDSHARED=$(CC) -shared
-PYTHON_ENV += CC="$(CC)"
-PYTHON_ENV += LDSHARED="$(LDSHARED)"
-PYTHON_ENV += LD="$(LD)"
-PYTHON_ENV += CFLAGS="$(CFLAGS)"
-COMPONENT_INSTALL_ENV += $(PYTHON_ENV)
+LDSHARED= $(CC) -shared
+PYTHON_ENV += LDSHARED="$(LDSHARED)"
# One of the tests, test_exception_switch (tests.test_cpp.CPPTests),
# failed in 64-bit. Skip it for now.
--- a/components/python/librabbitmq/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/librabbitmq/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -43,16 +43,6 @@
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
-# Needed to get around a broken /usr/lib/python2.7/config/Makefile
-# See CR #16837431.
-LD=$(CC)
-LDSHARED=$(CC) -G
-PYTHON_ENV += CC="$(CC)"
-PYTHON_ENV += LDSHARED="$(LDSHARED)"
-PYTHON_ENV += LD="$(LD)"
-PYTHON_ENV += CFLAGS="$(CFLAGS)"
-COMPONENT_INSTALL_ENV += $(PYTHON_ENV)
-
# common targets
build: $(BUILD_32_and_64)
--- a/components/python/m2crypto/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/m2crypto/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
#
include ../../../make-rules/shared-macros.mk
@@ -37,7 +37,7 @@
TPNO= 4424
# Syntax issues: not Python 3 ready.
-PYTHON_VERSIONS = 2.7 2.6
+PYTHON_VERSIONS= 2.7 2.6
include $(WS_TOP)/make-rules/prep.mk
include $(WS_TOP)/make-rules/setup.py.mk
--- a/components/python/markupsafe/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/markupsafe/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -40,16 +40,6 @@
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
-# Needed to get around a broken /usr/lib/python2.7/config/Makefile
-# See CR #16837431.
-LD=$(CC)
-LDSHARED=$(CC) -G
-PYTHON_ENV += CC="$(CC)"
-PYTHON_ENV += LDSHARED="$(LDSHARED)"
-PYTHON_ENV += LD="$(LD)"
-PYTHON_ENV += CFLAGS="$(CFLAGS)"
-COMPONENT_INSTALL_ENV += $(PYTHON_ENV)
-
COMPONENT_TEST_DIR= $(COMPONENT_SRC)
COMPONENT_TEST_ARGS= setup.py test
COMPONENT_TEST_ENV= PYTHONPATH=$(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES.32)
--- a/components/python/mysql/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/mysql/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -20,13 +20,11 @@
#
#
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
#
include ../../../make-rules/shared-macros.mk
-PATH=/usr/mysql/5.1/bin:/usr/bin:/usr/gnu/bin
-
COMPONENT_NAME= MySQL-python
COMPONENT_VERSION= 1.2.2
COMPONENT_PROJECT_URL= http://sourceforge.net/projects/mysql-python
@@ -46,7 +44,14 @@
include $(WS_TOP)/make-rules/setup.py.mk
include $(WS_TOP)/make-rules/ips.mk
-CFLAGS += -L/usr/mysql/5.1/lib/mysql -R/usr/mysql/5.1/lib/mysql
+PATH_32=/usr/mysql/5.5/bin/$(MACH32):/usr/bin:$(SPRO_VROOT)/bin
+PATH_64=/usr/mysql/5.5/bin:/usr/bin:$(SPRO_VROOT)/bin
+COMPONENT_BUILD_ENV += PATH=$(PATH_$(BITS)):$(PATH)
+COMPONENT_INSTALL_ENV += PATH=$(PATH_$(BITS)):$(PATH)
+
+CFLAGS_32= -L/usr/mysql/5.5/lib -R/usr/mysql/5.5/lib
+CFLAGS_64= -L/usr/mysql/5.5/lib/$(MACH64) -R/usr/mysql/5.5/lib/$(MACH64)
+CFLAGS += $(CFLAGS_$(BITS))
# common targets
build: $(BUILD_32)
--- a/components/python/netifaces/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/netifaces/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -45,16 +45,6 @@
COMPONENT_BUILD_ENV += CC_BITS="$(CC_BITS)"
-# Needed to get around a broken /usr/lib/python2.7/config/Makefile
-# See CR #16837431.
-LD=$(CC)
-LDSHARED=$(CC) -G
-PYTHON_ENV += CC="$(CC)"
-PYTHON_ENV += LDSHARED="$(LDSHARED)"
-PYTHON_ENV += LD="$(LD)"
-PYTHON_ENV += CFLAGS="$(CFLAGS)"
-COMPONENT_INSTALL_ENV += $(PYTHON_ENV)
-
# common targets
build: $(BUILD_32_and_64)
--- a/components/python/pycups/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/pycups/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
#
include ../../../make-rules/shared-macros.mk
@@ -37,7 +37,7 @@
TPNO= 9025
# Fails to compile: not Python 3 ready.
-PYTHON_VERSIONS = 2.7 2.6
+PYTHON_VERSIONS= 2.7 2.6
include $(WS_TOP)/make-rules/prep.mk
include $(WS_TOP)/make-rules/setup.py.mk
--- a/components/python/pycurl/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/pycurl/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
#
include ../../../make-rules/shared-macros.mk
@@ -41,7 +41,7 @@
TPNO= 5912
# Syntax issues: not Python 3 ready.
-PYTHON_VERSIONS = 2.7 2.6
+PYTHON_VERSIONS= 2.7 2.6
include $(WS_TOP)/make-rules/prep.mk
include $(WS_TOP)/make-rules/setup.py.mk
--- a/components/python/python-ldap/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/python-ldap/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
#
include ../../../make-rules/shared-macros.mk
@@ -34,7 +34,7 @@
TPNO= 14503
-# This module has syntax issues and this is not Python 3 ready.
+# This module has syntax issues and thus is not Python 3 ready.
PYTHON_VERSIONS = 2.7 2.6
include $(WS_TOP)/make-rules/prep.mk
@@ -43,21 +43,6 @@
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
-# Needed to get around a broken /usr/lib/python2.7/config/Makefile
-# See CR #16837431.
-LD=$(CC)
-LDSHARED=$(CC) -G $(CC_BITS)
-CFLAGS= $(CC_BITS)
-CPPFLAGS=
-LDFLAGS=
-PYTHON_ENV += CC="$(CC)"
-PYTHON_ENV += LDSHARED="$(LDSHARED)"
-PYTHON_ENV += LD="$(LD)"
-PYTHON_ENV += CFLAGS="$(CFLAGS)"
-PYTHON_ENV += CPPFLAGS="$(CPPFLAGS)"
-PYTHON_ENV += LDFLAGS="$(LDFLAGS)"
-COMPONENT_INSTALL_ENV += $(PYTHON_ENV)
-
COMPONENT_TEST_DIR = $(SOURCE_DIR)/Tests
COMPONENT_TEST_CMD = $(SHELL)
COMPONENT_TEST_ARGS = runtests.sh
--- a/components/python/python27/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/python27/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -111,15 +111,42 @@
# 64 bit shared objects need to go in a 64-bit directory
COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload
-# 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.
-#
+# Simplify the definitions of CC, CXX, CFLAGS and LDFLAGS so they hard-code
+# neither paths from our build systems nor Studio-specific options.
+COMPONENT_PRE_INSTALL_ACTION= \
+ (cd $(@D) ; $(GSED) -i -e 's/^CC=.*/CC=\t\tcc/' \
+ -e 's/^CXX=.*/CXX=\t\tCC/' \
+ -e 's/^CFLAGS=.*/CFLAGS=\t\t\$$\(BASECFLAGS) \$$\(OPT) \$$\(EXTRA_CFLAGS)/' \
+ -e 's|^LDFLAGS=.*|LDFLAGS=|' \
+ Makefile)
+
+# Because we stripped the Makefile above, we need to pass several things in the
+# environment, and use -e to tell gmake to pay attention to the environment.
+COMPONENT_INSTALL_ENV += CC="$(CC)"
+COMPONENT_INSTALL_ENV += CXX="$(CXX)"
+COMPONENT_INSTALL_ENV += CFLAGS="$(CFLAGS)"
+COMPONENT_INSTALL_ENV += LDFLAGS="$(LDFLAGS)"
+COMPONENT_INSTALL_ARGS += -e
+
+# 1. Setup pyconfig.h file to support 32 & 64 bit.
+# 2. If the /usr/lib/python2.7/lib2to3/*.pickle files are older than the
+# related *.txt files in the same directory, it will rebuild them any time
+# you try to build a Python module. So here we also touch the pickle files
+# to avoid this.
+# 3. Strip build machine paths from _sysconfigdata.py & config/Makefile.
+# Note that although the 64-bit version is not used (and thus commented
+# out in the manifest), we still need to specify the 32-/64-bit paths,
+# otherwise the 64-bit build will fail to find the 32-bit path.
+CONFIG_MAKEFILE.32= lib/python2.7/config/Makefile
+CONFIG_MAKEFILE.64= lib/$(MACH64)/python2.7/config/Makefile
+CONFIG_MAKEFILE= $(CONFIG_MAKEFILE.$(BITS))
COMPONENT_POST_INSTALL_ACTION= \
(cd $(PROTOUSRDIR) ; \
$(MV) include/python2.7/pyconfig.h include/python2.7/pyconfig-$(BITS).h ; \
- $(TOUCH) lib/python2.7/lib2to3/*.pickle)
+ $(TOUCH) lib/python2.7/lib2to3/*.pickle ; \
+ $(GSED) -i -e 's|$(SOURCE_DIR)|.|g' -e 's|$(COMPONENT_DIR)|..|g' \
+ -e 's|$(SPRO_VROOT)/bin/||g' lib/python2.7/_sysconfigdata.py \
+ $(CONFIG_MAKEFILE))
ASLR_MODE = $(ASLR_ENABLE)
--- a/components/python/python34/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/python34/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -122,6 +122,29 @@
ASLR_MODE = $(ASLR_ENABLE)
+# Simplify the definitions of CC, CXX, CFLAGS and LDFLAGS so they hard-code
+# neither paths from our build systems nor Studio-specific options.
+COMPONENT_PRE_INSTALL_ACTION= \
+ (cd $(@D) ; \
+ $(GSED) -i -e 's/^CC=.*/CC=\t\tcc/' -e 's/^CXX=.*/CXX=\t\tCC/' \
+ -e 's/^CFLAGS=.*/CFLAGS=\t\t\$$\(BASECFLAGS) \$$\(OPT) \$$\(EXTRA_CFLAGS)/' \
+ -e 's|^LDFLAGS=.*|LDFLAGS=|' Makefile)
+
+# Because we stripped the Makefile above, we need to pass several things in the
+# environment, and use -e to tell gmake to pay attention to the environment.
+COMPONENT_INSTALL_ENV += CC="$(CC)"
+COMPONENT_INSTALL_ENV += CXX="$(CXX)"
+COMPONENT_INSTALL_ENV += CFLAGS="$(CFLAGS)"
+COMPONENT_INSTALL_ENV += LDFLAGS="$(LDFLAGS)"
+COMPONENT_INSTALL_ARGS += -e
+
+# Strip build machine paths from _sysconfigdata.py & config/Makefile.
+COMPONENT_POST_INSTALL_ACTION= \
+ (cd $(PROTOUSRLIBDIR)/python3.4 ; \
+ $(GSED) -i -e 's|$(SOURCE_DIR)|.|g' -e 's|$(COMPONENT_DIR)|..|g' \
+ -e 's|$(SPRO_VROOT)/bin/||g' lib-dynload/64/_sysconfigdata.py \
+ config-3.4m/Makefile)
+
# common targets
build: $(BUILD_64)
install: $(INSTALL_64)
--- a/components/python/simplejson/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/simplejson/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -20,7 +20,7 @@
#
#
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
#
include ../../../make-rules/shared-macros.mk
@@ -38,17 +38,17 @@
TPNO= 5929
# Syntax issues: not Python 3 ready.
-PYTHON_VERSIONS = 2.7 2.6
+PYTHON_VERSIONS= 2.7 2.6
include $(WS_TOP)/make-rules/prep.mk
include $(WS_TOP)/make-rules/setup.py.mk
include $(WS_TOP)/make-rules/ips.mk
+ASLR_MODE = $(ASLR_NOT_APPLICABLE)
+
COMPONENT_TEST_DIR= $(COMPONENT_SRC)
COMPONENT_TEST_ARGS= ./setup.py test
-ASLR_MODE = $(ASLR_NOT_APPLICABLE)
-
# common targets
build: $(BUILD_32_and_64)
--- a/components/python/sqlalchemy/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/sqlalchemy/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -44,16 +44,6 @@
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
-# Needed to get around a broken /usr/lib/python2.7/config/Makefile
-# See CR #16837431.
-LD=$(CC)
-LDSHARED=$(CC) -G
-PYTHON_ENV += CC="$(CC)"
-PYTHON_ENV += LDSHARED="$(LDSHARED)"
-PYTHON_ENV += LD="$(LD)"
-PYTHON_ENV += CFLAGS="$(CFLAGS)"
-COMPONENT_INSTALL_ENV += $(PYTHON_ENV)
-
COMPONENT_TEST_DIR= $(SOURCE_DIR)
COMPONENT_TEST_ARGS= setup.py test
COMPONENT_TEST_ENV= PYTHONPATH=$(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES.32)
--- a/components/python/twisted/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/python/twisted/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -20,7 +20,7 @@
#
#
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
#
include ../../../make-rules/shared-macros.mk
@@ -38,7 +38,7 @@
TPNO= 9692
# Syntax issues: not Python 3 ready.
-PYTHON_VERSIONS = 2.7 2.6
+PYTHON_VERSIONS= 2.7 2.6
include $(WS_TOP)/make-rules/prep.mk
include $(WS_TOP)/make-rules/setup.py.mk
--- a/components/rdiff-backup/Makefile Mon Feb 02 19:25:18 2015 -0800
+++ b/components/rdiff-backup/Makefile Mon Feb 02 19:31:12 2015 -0800
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
#
include ../../make-rules/shared-macros.mk
@@ -43,11 +43,6 @@
include $(WS_TOP)/make-rules/ips.mk
include $(WS_TOP)/make-rules/setup.py.mk
-## just build a Python 2.6 version for now, when the 2.7 modules show up, we can
-## switch
-#PYTHON_VERSIONS = 2.6
-#PYTHON_DATA = /usr
-
# common targets
build: $(BUILD_32)
--- a/make-rules/setup.py.mk Mon Feb 02 19:25:18 2015 -0800
+++ b/make-rules/setup.py.mk Mon Feb 02 19:31:12 2015 -0800
@@ -62,6 +62,7 @@
PYTHON_ENV = CC="$(CC)"
PYTHON_ENV += CFLAGS="$(CFLAGS)"
+PYTHON_ENV += PATH="$(PATH):$(SPRO_VROOT)/bin"
COMPONENT_BUILD_ENV += $(PYTHON_ENV)
COMPONENT_INSTALL_ENV += $(PYTHON_ENV)