# HG changeset patch # User John Beck # Date 1422396037 28800 # Node ID 7befd73326ebbb7d4145bd91020f2db6b6fcb1a1 # Parent 482769b9a31bf2d0e61db64c54a43ae99714c3a3 20396493 environment influences python2.7 and python3.4 builds diff -r 482769b9a31b -r 7befd73326eb components/python/python27/Makefile --- a/components/python/python27/Makefile Wed Jan 21 17:55:00 2015 -0800 +++ b/components/python/python27/Makefile Tue Jan 27 14:00:37 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 @@ -93,6 +93,13 @@ # Python puts its header files in a special place. LINT_FLAGS += -I$(SOURCE_DIR)/Include +# PYTHONPATH in the environment can be harmful, but setting it to empty via +# _INSTALL_ENV causes problems too, so just ignore the entire environment. +# Because of this, we need to specify PATH in multiple places below. +ENV += -i + +CONFIGURE_ENV += PATH="$(PATH)" + CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) CONFIGURE_OPTIONS += --enable-shared CONFIGURE_OPTIONS += --with-system-expat @@ -105,6 +112,7 @@ CONFIGURE_OPTIONS += DFLAGS="-$(BITS)" CONFIGURE_OPTIONS += XPROFILE_DIR="$(XPROFILE_DIR)" +COMPONENT_BUILD_ENV += PATH="$(PATH)" COMPONENT_BUILD_ENV += DFLAGS="-$(BITS)" COMPONENT_BUILD_ENV += XPROFILE_DIR="$(XPROFILE_DIR)" @@ -126,6 +134,7 @@ COMPONENT_INSTALL_ENV += CXX="$(CXX)" COMPONENT_INSTALL_ENV += CFLAGS="$(CFLAGS)" COMPONENT_INSTALL_ENV += LDFLAGS="$(LDFLAGS)" +COMPONENT_INSTALL_ENV += PATH="$(PATH)" COMPONENT_INSTALL_ARGS += -e # 1. Setup pyconfig.h file to support 32 & 64 bit. @@ -167,6 +176,7 @@ # between tests. # COMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)" +COMPONENT_TEST_ENV += PATH="$(PATH)" COMPONENT_TEST_TARGETS = test test: $(TEST_32_and_64) diff -r 482769b9a31b -r 7befd73326eb components/python/python34/Makefile --- a/components/python/python34/Makefile Wed Jan 21 17:55:00 2015 -0800 +++ b/components/python/python34/Makefile Tue Jan 27 14:00:37 2015 -0800 @@ -98,6 +98,13 @@ # Python puts its header files in a special place. LINT_FLAGS += -I$(SOURCE_DIR)/Include +# PYTHONPATH in the environment can be harmful, but setting it to empty via +# _INSTALL_ENV causes problems too, so just ignore the entire environment. +# Because of this, we need to specify PATH in multiple places below. +ENV += -i + +CONFIGURE_ENV += PATH="$(PATH)" + CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) CONFIGURE_OPTIONS += --enable-shared CONFIGURE_OPTIONS += --with-dtrace @@ -115,6 +122,7 @@ COMPONENT_BUILD_ENV += DFLAGS="-$(BITS)" COMPONENT_BUILD_ENV += XPROFILE_DIR="$(XPROFILE_DIR)" +COMPONENT_BUILD_ENV += PATH="$(PATH)" # Some tests have non-ASCII characters encoded for international domain names; # the publish step will fail in 'pkgdepend generate' without this: @@ -139,6 +147,7 @@ COMPONENT_INSTALL_ENV += CXX="$(CXX)" COMPONENT_INSTALL_ENV += CFLAGS="$(CFLAGS)" COMPONENT_INSTALL_ENV += LDFLAGS="$(LDFLAGS)" +COMPONENT_INSTALL_ENV += PATH="$(PATH)" COMPONENT_INSTALL_ARGS += -e # Strip build machine paths from _sysconfigdata.py & config/Makefile. @@ -162,6 +171,7 @@ # between tests. # COMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)" +COMPONENT_TEST_ENV += PATH="$(PATH)" # Prevent the tests from getting stuck waiting for input. COMPONENT_TEST_TARGETS = test < /dev/null